No Code Attached Yet bug
avatar Fedik
Fedik
11 Sep 2024

Steps to reproduce the issue

Code review.

Administartor Articles list, access check works incorectly when filter by category is active.

Here

$canDo = ContentHelper::getActions('com_content', 'category', $this->state->get('filter.category_id'));

Method ContentHelper::getActions() expects the ID of the category, but recieve an array of IDs.
Internaly it cast the array to ID 1, and return $canDo for non existing category com_content.category.1.

$assetName .= '.' . $section . '.' . (int) $id;

No idea how it can be fixed without reverting multi-filter, or rewriting addToolbar() logick.

System information (as much as possible)

Joomla 4.x
Joomla 5.x

Reference:

avatar Fedik Fedik - open - 11 Sep 2024
avatar joomla-cms-bot joomla-cms-bot - change - 11 Sep 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Sep 2024
avatar Fedik Fedik - change - 11 Sep 2024
Labels Added: bug
avatar Fedik Fedik - labeled - 11 Sep 2024
avatar Fedik Fedik - change - 11 Sep 2024
The description was changed
avatar Fedik Fedik - edited - 11 Sep 2024
avatar Fedik Fedik - change - 11 Sep 2024
The description was changed
avatar Fedik Fedik - edited - 11 Sep 2024
avatar Fedik Fedik - change - 12 Sep 2024
Title
[5.x] Administrator Articles: access check for toolbar buttons works incorrectly when filter by category is active
Administrator Articles: access check for toolbar buttons works incorrectly when filter by category is active
avatar Fedik Fedik - edited - 12 Sep 2024
avatar Fedik Fedik - change - 12 Sep 2024
The description was changed
avatar Fedik Fedik - edited - 12 Sep 2024
avatar Fedik Fedik - change - 12 Sep 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-09-12 09:06:59
Closed_By Fedik
avatar Fedik Fedik - close - 12 Sep 2024

Add a Comment

Login with GitHub to post a comment