[4.0] Fix categories accordion#35093
Conversation
|
When I apply the patch I get an error: The requested page can't be found. |
|
Thanks @RickR2H. This changes JS file, so I think the easiest way to test is update your installation to update package generated by this PR https://ci.joomla.org/artifacts/joomla/joomla-cms/4.0-dev/35093/downloads/46491/Joomla_4.0.0-rc7-dev+pr.35093-Development-Update_Package.zip (or run npm command, but to be honest, I haven't tried that method myself) |
|
I have tested this item ✅ successfully on d0786f2 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35093. |
Yes. I do not have good frontend skill to make it nicer, so I just fix the js bugs here. Thanks for testing :). |
|
@RickR2H how did you get an image? I see the description but no image. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35093. |
|
@chmst simply add an image to the dedicated category image field. Just edit the category and you'll find it 😉 |
|
I have tested this item ✅ successfully on d0786f2 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35093. |
|
result This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35093. |
|
As soon as this PR gets merged I'll try to take a look to fix the layout. |
|
Thanks @RickR2H . We should also do the same fix for categories view of com_contact and com_newsfeeds to (the layout and logic is the same) |
|
@joomdonation look like a nice side project 😉 |
|
RTC. Hope maintainer will merge it so that we can work on the layout fixes and apply the same fix for other components. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35093. |
|
Thanks! |
|
@RickR2H This PR is now merged. Could you please help making the categories view nicer :) ? |
|
@joomdonation layout change added and ready for testing |

Pull Request for Issue # .
Summary of Changes
The categories accordion implemented in this PR #33052 won't work properly when the menu item created to display categories tree when the sub-category has image or description and one of the two settings below set to show:
If image or description is being show,
button.nextElementSiblingwill point to wrong div tag (you can see it by reading the code at https://github.com/joomla/joomla-cms/blob/4.0-dev/components/com_content/tmpl/categories/default_items.php#L34-L53This PRs solve it by adding an attribute to the button to allow getting ID of the category and use it to get the right div which contains children categories of that category
I also made small modification to build/media_source/com_categories/joomla.asset.json to define preset so that we can call usePreset to load both JS and CSS in a single line of code.
Testing Instructions