-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Multilingual: correcting alternates when associated menu items are com_users items #13152
Conversation
Trying to understand the testing instructions. Don't sure that I understand them so is here a more 'practical' explanation so me dumb blond can understand it and test? I simply do not know what to look for at present guidelines. Thanks JM |
@@ -774,7 +774,7 @@ public function onAfterDispatch() | |||
// Heads up! "$item = $menu" here below is an assignment, *NOT* comparison | |||
case (isset($associations[$i]) && ($item = $menu->getItem($associations[$i]))): | |||
|
|||
$language->link = JRoute::_($item->link . '&Itemid=' . $item->id . '&lang=' . $language->sef); | |||
$language->link = JRoute::_('index.php?&Itemid=' . $item->id . '&lang=' . $language->sef); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just index.php?Itemid=
(ie, remove the '&')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops.. done
@gwsdesk Forgot to say that SEF should be on to test this. |
I have tested this item ✅ successfully on 9a67290 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13152. |
I have tested this item ✅ successfully on 9a67290 Thanks for clarifying. Works4me JM as well now. Thanks for the patch ! This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13152. |
RTC as we have 2 successful tests This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13152. |
Issue: #13142
See description there.
Summary of Changes
Adding a special case when associating com_users menu items (login. logout, password reset, reminder, registration, etc.)
EDIT: as we only need the itemid and lang, simplified code.
Testing Instructions
Install a multilingual site with associations.
Make sure
Add Alternate Meta Tags
is set to Yes in the languagefilter parameter.Set SEF to on.
Create various menu items with different aliases using com_users menu item in each language and associate them.
Display these menu items in frontend.
Check the source of the page.
Before patch, the alternate will always display the same url in the alternate for all languages.
(I have also set here one of the login menu item as child of another different menu item)
After patch
Now the alternate are correct
Documentation Changes Required
None. This is solving a bug due, I guess, to the com_users router
@ioweb-gr @mbabker @andrepereiradasilva
Thank you for testing.