Skip to content

Commit a2f0582

Browse files
infograf768wilsonge
authored andcommitted
[4.0] Fix #21357 when multilanguage is implemented (#21391)
* [4.0] Fix: Associations tab should display only one Notice when item edited is set to ALL languages * correcting my local branch * [4.0] Fix 21357 when multilang is implemented
1 parent cbf7891 commit a2f0582

File tree

1 file changed

+4
-2
lines changed
  • administrator/components/com_content/View/Article

1 file changed

+4
-2
lines changed

administrator/components/com_content/View/Article/HtmlView.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Joomla\CMS\Component\ComponentHelper;
2222
use Joomla\CMS\Factory;
2323
use Joomla\Component\Content\Administrator\Helper\PreviewHelper;
24+
use Joomla\CMS\Language\Multilanguage;
2425

2526
/**
2627
* View to edit an article.
@@ -198,9 +199,10 @@ function (Toolbar $childBar) use ($checkedOut, $itemEditable, $canDo)
198199
$linkSuffix = '&layout=modal&client_id=0&tmpl=component&' . Session::getFormToken() . '=1';
199200
$linkItem = 'index.php?option=com_menus&view=item' . $linkSuffix;
200201

201-
if (isset($this->element['language']))
202+
// Force the language of the menu item when multilang is implemented
203+
if (Multilanguage::isEnabled() && $this->form->getValue('language') !== '*')
202204
{
203-
$linkItem .= '&forcedLanguage=' . $this->element['language'];
205+
$linkItem .= '&forcedLanguage=' . $this->form->getValue('language');
204206
}
205207

206208
$urlNew = $linkItem . '&task=item.add';

0 commit comments

Comments
 (0)