diff --git a/plugins/sampledata/blog/src/Extension/Blog.php b/plugins/sampledata/blog/src/Extension/Blog.php index 671556dd5417f..c6aa9d01d157d 100644 --- a/plugins/sampledata/blog/src/Extension/Blog.php +++ b/plugins/sampledata/blog/src/Extension/Blog.php @@ -105,6 +105,9 @@ public function onAjaxSampledataApplyStep1() $language = Multilanguage::isEnabled() ? $this->getApplication()->getLanguage()->getTag() : '*'; $langSuffix = ($language !== '*') ? ' (' . $language . ')' : ''; + // Disable language debug to prevent debug_lang_const being added to the string + $this->getApplication()->getLanguage()->setDebug(false); + /** @var \Joomla\Component\Tags\Administrator\Model\TagModel $model */ $modelTag = $this->getApplication()->bootComponent('com_tags')->getMVCFactory() ->createModel('Tag', 'Administrator', ['ignore_request' => true]); @@ -794,6 +797,9 @@ public function onAjaxSampledataApplyStep2() $language = Multilanguage::isEnabled() ? $this->getApplication()->getLanguage()->getTag() : '*'; $langSuffix = ($language !== '*') ? ' (' . $language . ')' : ''; + // Disable language debug to prevent debug_lang_const being added to the string + $this->getApplication()->getLanguage()->setDebug(false); + // Create the menu types. $menuTable = new \Joomla\Component\Menus\Administrator\Table\MenuTypeTable($this->getDatabase()); $menuTypes = []; @@ -1343,6 +1349,9 @@ public function onAjaxSampledataApplyStep3() $language = Multilanguage::isEnabled() ? $this->getApplication()->getLanguage()->getTag() : '*'; $langSuffix = ($language !== '*') ? ' (' . $language . ')' : ''; + // Disable language debug to prevent debug_lang_const being added to the string + $this->getApplication()->getLanguage()->setDebug(false); + // Add Include Paths. /** @var \Joomla\Component\Modules\Administrator\Model\ModuleModel $model */ $model = $this->getApplication()->bootComponent('com_modules')->getMVCFactory() @@ -1897,6 +1906,9 @@ private function addMenuItems(array $menuItems, $level) $language = Multilanguage::isEnabled() ? $this->getApplication()->getLanguage()->getTag() : '*'; $langSuffix = ($language !== '*') ? ' (' . $language . ')' : ''; + // Disable language debug to prevent debug_lang_const being added to the string + $this->getApplication()->getLanguage()->setDebug(false); + foreach ($menuItems as $menuItem) { // Reset item.id in model state. $this->menuItemModel->setState('item.id', 0);