diff --git a/plugins/sampledata/blog/blog.php b/plugins/sampledata/blog/blog.php index 75edacc951163..f0cc29e60cfac 100644 --- a/plugins/sampledata/blog/blog.php +++ b/plugins/sampledata/blog/blog.php @@ -119,6 +119,9 @@ public function onAjaxSampledataApplyStep1() $language = Multilanguage::isEnabled() ? Factory::getLanguage()->getTag() : '*'; $langSuffix = ($language !== '*') ? ' (' . $language . ')' : ''; + // Set debugging to false to prevent saving of prepend/appended debug_lang_const + Factory::getLanguage()->setDebug(false); + /** @var \Joomla\Component\Tags\Administrator\Model\TagModel $model */ $modelTag = $this->app->bootComponent('com_tags')->getMVCFactory()->createModel('Tag', 'Administrator', ['ignore_request' => true]); @@ -834,6 +837,9 @@ public function onAjaxSampledataApplyStep2() $language = Multilanguage::isEnabled() ? Factory::getLanguage()->getTag() : '*'; $langSuffix = ($language !== '*') ? ' (' . $language . ')' : ''; + // Set debugging to false to prevent saving of prepend/appended debug_lang_const + Factory::getLanguage()->setDebug(false); + // Create the menu types. $menuTable = new \Joomla\Component\Menus\Administrator\Table\MenuTypeTable($this->db); $menuTypes = array(); @@ -1407,6 +1413,9 @@ public function onAjaxSampledataApplyStep3() $language = Multilanguage::isEnabled() ? Factory::getLanguage()->getTag() : '*'; $langSuffix = ($language !== '*') ? ' (' . $language . ')' : ''; + // Set debugging to false to prevent saving of prepend/appended debug_lang_const + Factory::getLanguage()->setDebug(false); + // Add Include Paths. $model = new \Joomla\Component\Modules\Administrator\Model\ModuleModel; $access = (int) $this->app->get('access', 1); diff --git a/plugins/sampledata/testing/testing.php b/plugins/sampledata/testing/testing.php index 775f2ab9d007b..d1397f41c410f 100644 --- a/plugins/sampledata/testing/testing.php +++ b/plugins/sampledata/testing/testing.php @@ -112,6 +112,9 @@ public function onAjaxSampledataApplyStep1() return $response; } + // Set debugging to false to prevent saving of prepend/appended debug_lang_const + Factory::getLanguage()->setDebug(false); + /** @var \Joomla\Component\Tags\Administrator\Model\TagModel $model */ $model = $this->app->bootComponent('com_tags')->getMVCFactory()->createModel('Tag', 'Administrator', ['ignore_request' => true]); $access = (int) $this->app->get('access', 1); @@ -220,6 +223,9 @@ public function onAjaxSampledataApplyStep2() return $response; } + // Set debugging to false to prevent saving of prepend/appended debug_lang_const + Factory::getLanguage()->setDebug(false); + $factory = $this->app->bootComponent('com_banners')->getMVCFactory(); /** @var Joomla\Component\Banners\Administrator\Model\ClientModel $clientModel */ @@ -400,6 +406,9 @@ public function onAjaxSampledataApplyStep3() return $response; } + // Set debugging to false to prevent saving of prepend/appended debug_lang_const + Factory::getLanguage()->setDebug(false); + // Insert first level of categories. $categories = array(); $categories[] = array( @@ -1050,6 +1059,9 @@ public function onAjaxSampledataApplyStep5() return $response; } + // Set debugging to false to prevent saving of prepend/appended debug_lang_const + Factory::getLanguage()->setDebug(false); + $model = $this->app->bootComponent('com_contact')->getMVCFactory()->createModel('Contact', 'Administrator', ['ignore_request' => true]); $access = (int) $this->app->get('access', 1); $user = Factory::getUser(); @@ -1402,6 +1414,9 @@ public function onAjaxSampledataApplyStep6() return $response; } + // Set debugging to false to prevent saving of prepend/appended debug_lang_const + Factory::getLanguage()->setDebug(false); + /** @var \Joomla\Component\Newsfeeds\Administrator\Model\NewsfeedModel $model */ $model = $this->app->bootComponent('com_newsfeeds')->getMVCFactory()->createModel('Newsfeed', 'Administrator', ['ignore_request' => true]); $access = (int) $this->app->get('access', 1); @@ -1530,6 +1545,9 @@ public function onAjaxSampledataApplyStep7() return $response; } + // Set debugging to false to prevent saving of prepend/appended debug_lang_const + Factory::getLanguage()->setDebug(false); + /** @var \Joomla\Component\Menus\Administrator\Model\MenuModel $model */ $factory = $this->app->bootComponent('com_menus')->getMVCFactory(); $model = $factory->createModel('Menu', 'Administrator', ['ignore_request' => true]); @@ -3242,6 +3260,9 @@ public function onAjaxSampledataApplyStep8() return $response; } + // Set debugging to false to prevent saving of prepend/appended debug_lang_const + Factory::getLanguage()->setDebug(false); + $model = $this->app->bootComponent('com_modules')->getMVCFactory()->createModel('Module', 'Administrator', ['ignore_request' => true]); $access = (int) $this->app->get('access', 1); @@ -4621,6 +4642,9 @@ private function addArticles(array $articles) $user = Factory::getUser(); $mvcFactory = $this->app->bootComponent('com_content')->getMVCFactory(); + // Set debugging to false to prevent saving of prepend/appended debug_lang_const + Factory::getLanguage()->setDebug(false); + foreach ($articles as $i => $article) { /** @var \Joomla\Component\Content\Administrator\Model\ArticleModel $model */