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
Bug: Correcting category associations #15664
Conversation
@@ -36,7 +36,7 @@ public static function getAssociations($id = 0, $view = null) | |||
$view = $view === null ? $jinput->get('view') : $view; | |||
$id = empty($id) ? $jinput->getInt('id') : $id; | |||
|
|||
if ($view === 'article' || $view === 'category' || $view === 'featured') | |||
if ($view === 'article') |
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.
I don't think you should remove the || $view === 'featured'
here. Only the category case needs to be gone.
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.
it works though.
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.
Judging from code it could break if the current view is "featured". But I wasn't able to find a way to break it, so you may be right that it is not needed 👍
I have tested this item ✅ successfully on effd40c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15664. |
I have tested this item ✅ successfully on effd40c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15664. |
RTC after two successful tests. |
* Bug: Correcting category associations * Thanks, Thomas
Pull Request for Issue #15612
Summary of Changes
Correcting faulty code in #12042
Testing Instructions
Create a multilingual site (2 languages is enough)
Create a new article category for each language. Associate these new categories.
Create an article in each of these new categories. Tagged to the same language.
In the mainmenu for one of the languages, create a new menu item of type category list displaying the new category tagged to the same language as the Home page of that menu.
In frontend, display this menu item. Using the language switcher, click on the flag of the other language
Before patch
Clicking on that flag will display the home page of that language.
After patch
The associated category will display correctly.
@oliver-74
Please confirm on issues.joomla.org
@Bakual
This patch makes us lose the possible associated flag next to associated articles when displaying a blog or a category list. We do keep it OK when the view is
article
orfeatured
.Any way you see to not lose the feature for category views?