User tests: Successful: Unsuccessful:
Pull Request for Issue #35497.
The Smart Search module adds all get fields of the form route as additional hidden input fields to the search form. The router always adds the Itemid to the URL and thus will also always add the Itemid as hidden input field. Since the code in line 42 however doesn't check the processed URL, but just the unSEFed URL, it will often enough not contain the Itemid. Long story short: The code in line 42 doesn't find an Itemid and thus adds it in addition, while the code in line 45 adds the Itemid (via the router) and then line 49 adds it a second time. We can simply drop this whole "check for Itemid" code. Either the Itemid is a valid Smart Search menu item, then it will create a nice SEF URL, no Itemid will be in the query in line 49, or the Itemid is part of the get query and will be added as hidden input.
I'm copying the instructions by @brianteeman here, since they are perfect for this.
Create a smart search module. Do not create a search menu item or set an ItemID in the module
image
Then visit the front end and perform a search with the module
The url is example.com/component/finder/search?q=&Itemid=101&Itemid=101
The url is example.com/component/finder/search?q=&Itemid=xxx
Repeat the test but this time add a search menu item or set an ItemID in the module
Then visit the front end and perform a search with the module
The url is example.com/component/finder/search?q=&Itemid=101&Itemid=xxx
where xxx is the id of the search menu item or the id of the menu item selected in the module
where 101 is the id of the default home page
The url is example.com/component/finder/search?q=&Itemid=xxx
where xxx is the id of the search menu item or the id of the menu item selected in the module
Status | New | ⇒ | Pending |
Category | ⇒ | Modules Front End |
Labels |
Added:
?
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-01-20 08:08:43 |
Closed_By | ⇒ | Hackwar |
I have tested this item? unsuccessfully on 077a5e8
When the module is set to use a specific menu item this does not work. it just uses 101
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36426.