User tests: Successful: Unsuccessful:
Pull Request for Issue # .
This is my attempt to improve the code add breadcrumbs in category view. Currently, the code is messy, hard to understand and could contains potential issue (wrong value for $id variable if you read the code - there is a reason we use @ in the code $id = (int) @$menu->query['id'];)
If someone can review the code changes, that would be great.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_content Libraries |
Labels |
Added:
?
|
@joomdonation - you are right, both menu items, Category List and Category Blog, display articles from the same category or categories in the same branch of the category tree.
If that is expected behaviour, it means that a website cannot have both Category List and Category Blog that list articles from the same category. In other words, a Category Blog should not list articles from from a subcategory, the main category of which is displayed as Category List. BTW, the incorrect element in the breadcrumb is not the alias of the other category but the alias of the menu item that displays the Category Blog based on the other category.
This restriction should be documented to emphasize that in case Category List and Category Blog need to co-exist, they need to refer to separate branches of the category tree. If the categories involved in the two menu items overlap, parts of the breadcrumb that refer to menu items will display inconsistent information.
Right or wrong that has been the behaviour since day 1
I have tested this item
@joomdonation from what I can tell from looking at the code, the before and after tests should effectively give the same result for the breadcrumbs in the category list and category blog views. As such, the test passes.
As per the rest of discussion with @toivo and @brianteeman, the parent items when you look at an article return the user back to the lower numbered version of the Category menu item. Having two views for the same piece of information is not optimal, and ideally is avoided when building a site (ie you either have a Category Blog view OR a Category List view, not both).
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-03-18 18:52:57 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
I have tested this item✅ successfully on 620e924
Tested successfully in Beta8-dev of 27 February in Wampserver using PHP 8.0.2.
There is one anomaly which happens with or without this patch and could be addressed in a separate issue report:
My Main Menu has two items, My Category List and My Category Blog. Every time My Category List is selected and an article or subcategory is accessed, the first part of the breadcrumb after Home shows My Category Blog, instead of My Category List. Something wrong in routing perhaps?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32535.