Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Installing sample blog data with lang debug on #44624

Open
wants to merge 1 commit into
base: 5.3-dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions plugins/sampledata/blog/src/Extension/Blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down Expand Up @@ -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 = [];
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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);
Expand Down