? bug PR-4.3-dev Pending

User tests: Successful: Unsuccessful:

avatar QuonXF
QuonXF
28 Mar 2023

Pull Request for Issue #36546 and #34527.

Fix for SEF-URL (search engines friendly url), hides the filter_tag parameter from the URL when the menu item is created with category type and filtering by tag or tags.

Actual result BEFORE applying this Pull Request

https://site.local/menu?filter_tag[0]=X?filter_tag[1]=Y
https://site.local/menu/itemA?filter_tag[0]=X
https://site.local/menu/itemA/subitemA?filter_tag[0]=X

Expected result AFTER applying this Pull Request

https://site.local/menu
https://site.local/menu/itemA
https://site.local/menu/itemA/subitemA

avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2023
Category Libraries
avatar QuonXF QuonXF - open - 28 Mar 2023
avatar QuonXF QuonXF - change - 28 Mar 2023
Status New Pending
avatar brianteeman
brianteeman - comment - 28 Mar 2023

Surely that is not correct. If you already have a menu item /menu/category

avatar QuonXF QuonXF - change - 28 Mar 2023
The description was changed
avatar QuonXF QuonXF - edited - 28 Mar 2023
avatar QuonXF QuonXF - change - 28 Mar 2023
The description was changed
avatar QuonXF QuonXF - edited - 28 Mar 2023
avatar QuonXF
QuonXF - comment - 28 Mar 2023

There is a menu item with the blog category type and with a selection by tag, as well as a sub menu item with the same parameters.

Before the patch:
https://site.local/menu?filter_tag[0]=XXX
https://site.local/menu/itemA?filter_tag[0]=XXX
https://site.local/menu/itemA/subitemA?filter_tag[0]=XXX

After the patch:
https://site.local/menu
https://site.local/menu/itemA
https://site.local/menu/itemA/subitemA

avatar brianteeman
brianteeman - comment - 28 Mar 2023

But if you already have a menu item without a filter?

avatar QuonXF
QuonXF - comment - 28 Mar 2023

Then nothing will happen to him.

If the menu was created without filtering by tag, then when getting the menu item
$item = $this->router->menu->getItem($query['Itemid'])

the filter_tag parameter will be missing and check
if ($item->query['filter_tag'] === $query['filter_tag'])

will return false and will not execute
unset($query['filter_tag'])

When SEF-URL (search engines friendly url) is disabled, everything will be in place.

With tag filtering:
index.php?option=com_content&view=category&layout=blog&id=145&filter_tag[0]=2&Itemid=401

Without tag filtering:
index.php?option=com_content&view=category&layout=blog&id=145&Itemid=403

avatar QuonXF QuonXF - change - 28 Mar 2023
Title
Hide the filter_tag parameter
Hide the filter_tag parameter in URL
avatar QuonXF QuonXF - edited - 28 Mar 2023
avatar QuonXF QuonXF - change - 28 Mar 2023
The description was changed
avatar QuonXF QuonXF - edited - 28 Mar 2023
avatar QuonXF QuonXF - change - 30 Mar 2023
Labels Added: PR-4.3-dev
avatar QuonXF
QuonXF - comment - 1 Apr 2023

Added a check for the existence of the filter_tag variable by the selected item, and added a check for query for the presence of a filter_tag.

avatar QuonXF QuonXF - change - 1 Apr 2023
The description was changed
avatar QuonXF QuonXF - edited - 1 Apr 2023
avatar QuonXF QuonXF - change - 1 Apr 2023
The description was changed
avatar QuonXF QuonXF - edited - 1 Apr 2023
avatar QuonXF QuonXF - change - 1 Apr 2023
The description was changed
avatar QuonXF QuonXF - edited - 1 Apr 2023
avatar QuonXF QuonXF - change - 1 Apr 2023
The description was changed
avatar QuonXF QuonXF - edited - 1 Apr 2023
avatar QuonXF QuonXF - change - 2 Apr 2023
The description was changed
avatar QuonXF QuonXF - edited - 2 Apr 2023
avatar MacJoom MacJoom - test_item - 21 Apr 2023 - Tested successfully
avatar MacJoom
MacJoom - comment - 21 Apr 2023
avatar formfranska formfranska - test_item - 21 Apr 2023 - Tested successfully
avatar formfranska
formfranska - comment - 21 Apr 2023

I have tested this item successfully on 676db19

Thank you for this patch ?????


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40225.

avatar richard67 richard67 - change - 21 Apr 2023
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 21 Apr 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40225.

avatar sdwjoomla sdwjoomla - change - 5 May 2023
Labels Added: ? bug
avatar obuisard obuisard - change - 5 May 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-05-05 21:03:05
Closed_By obuisard
avatar obuisard obuisard - close - 5 May 2023
avatar obuisard obuisard - merge - 5 May 2023
avatar obuisard
obuisard - comment - 5 May 2023

Thank you @QuonXF for the PR!

Add a Comment

Login with GitHub to post a comment