@@ -105,6 +105,9 @@ public function onAjaxSampledataApplyStep1()
105105 $ language = Multilanguage::isEnabled () ? $ this ->getApplication ()->getLanguage ()->getTag () : '* ' ;
106106 $ langSuffix = ($ language !== '* ' ) ? ' ( ' . $ language . ') ' : '' ;
107107
108+ // Disable language debug to prevent debug_lang_const being added to the string
109+ $ this ->getApplication ()->getLanguage ()->setDebug (false );
110+
108111 /** @var \Joomla\Component\Tags\Administrator\Model\TagModel $model */
109112 $ modelTag = $ this ->getApplication ()->bootComponent ('com_tags ' )->getMVCFactory ()
110113 ->createModel ('Tag ' , 'Administrator ' , ['ignore_request ' => true ]);
@@ -794,6 +797,9 @@ public function onAjaxSampledataApplyStep2()
794797 $ language = Multilanguage::isEnabled () ? $ this ->getApplication ()->getLanguage ()->getTag () : '* ' ;
795798 $ langSuffix = ($ language !== '* ' ) ? ' ( ' . $ language . ') ' : '' ;
796799
800+ // Disable language debug to prevent debug_lang_const being added to the string
801+ $ this ->getApplication ()->getLanguage ()->setDebug (false );
802+
797803 // Create the menu types.
798804 $ menuTable = new \Joomla \Component \Menus \Administrator \Table \MenuTypeTable ($ this ->getDatabase ());
799805 $ menuTypes = [];
@@ -1343,6 +1349,9 @@ public function onAjaxSampledataApplyStep3()
13431349 $ language = Multilanguage::isEnabled () ? $ this ->getApplication ()->getLanguage ()->getTag () : '* ' ;
13441350 $ langSuffix = ($ language !== '* ' ) ? ' ( ' . $ language . ') ' : '' ;
13451351
1352+ // Disable language debug to prevent debug_lang_const being added to the string
1353+ $ this ->getApplication ()->getLanguage ()->setDebug (false );
1354+
13461355 // Add Include Paths.
13471356 /** @var \Joomla\Component\Modules\Administrator\Model\ModuleModel $model */
13481357 $ model = $ this ->getApplication ()->bootComponent ('com_modules ' )->getMVCFactory ()
@@ -1897,6 +1906,9 @@ private function addMenuItems(array $menuItems, $level)
18971906 $ language = Multilanguage::isEnabled () ? $ this ->getApplication ()->getLanguage ()->getTag () : '* ' ;
18981907 $ langSuffix = ($ language !== '* ' ) ? ' ( ' . $ language . ') ' : '' ;
18991908
1909+ // Disable language debug to prevent debug_lang_const being added to the string
1910+ $ this ->getApplication ()->getLanguage ()->setDebug (false );
1911+
19001912 foreach ($ menuItems as $ menuItem ) {
19011913 // Reset item.id in model state.
19021914 $ this ->menuItemModel ->setState ('item.id ' , 0 );
0 commit comments