? ? Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
20 Jan 2022

Pull Request for Issue #35497.

Summary of Changes

The Smart Search module allows to select which Smart Search filter configuration should be used for this search box by selecting the specific menu item with that configuration. Unfortunately the code contains an issue where the relevant Itemid is duplicated in the output and it even could have conflicting values.

Testing Instructions

I'm copying the instructions by @brianteeman here, since they are perfect for this.

Steps to reproduce the issue PART 1

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

Actual result BEFORE applying this Pull Request

The url is example.com/component/finder/search?q=&Itemid=101&Itemid=101

Expected result AFTER applying this Pull Request

The url is example.com/component/finder/search?q=&Itemid=xxx

Steps to reproduce the issue PART 2

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

Actual result BEFORE applying this Pull Request

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

Expected result AFTER applying this Pull Request

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

avatar Hackwar Hackwar - open - 20 Jan 2022
avatar Hackwar Hackwar - change - 20 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jan 2022
Category Front End com_finder Modules
avatar Hackwar Hackwar - change - 20 Jan 2022
Title
[4.2] Smart Search: Fix forced Itemid in module
[4.1] Smart Search: Fix forced Itemid in module
avatar Hackwar Hackwar - edited - 20 Jan 2022
avatar Hackwar Hackwar - change - 20 Jan 2022
Labels Added: ?
avatar Fedik Fedik - test_item - 20 Feb 2022 - Tested successfully
avatar Fedik
Fedik - comment - 20 Feb 2022

I have tested this item successfully on 5c59558


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

avatar jwaisner jwaisner - test_item - 22 Feb 2022 - Tested successfully
avatar jwaisner
jwaisner - comment - 22 Feb 2022

I have tested this item successfully on 5c59558


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

avatar jwaisner jwaisner - change - 22 Feb 2022
Status Pending Ready to Commit
avatar jwaisner
jwaisner - comment - 22 Feb 2022

RTC


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

avatar laoneo laoneo - change - 11 Mar 2022
Labels Added: ?
avatar richard67
richard67 - comment - 11 Mar 2022

@laoneo Do you think this needs to be tested again after your suggested change was implemented?

avatar laoneo
laoneo - comment - 11 Mar 2022

No, just merge it.

avatar bembelimen
bembelimen - comment - 11 Mar 2022

If we change the signature of a public method we have to put into 5.0.

Any way to overcome this?

avatar laoneo
laoneo - comment - 11 Mar 2022

The new argument has a default value so we are covered.

avatar richard67
richard67 - comment - 16 Mar 2022

If we change the signature of a public method we have to put into 5.0.

Any way to overcome this?

The new argument has a default value so we are covered.

@bembelimen Are you ok with @laoneo 's reply?

avatar bembelimen
bembelimen - comment - 16 Mar 2022

No, it will make problems with PHP 8.1

avatar laoneo laoneo - change - 1 Apr 2022
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 1 Apr 2022
Category Front End com_finder Modules Modules Front End
avatar Hackwar
Hackwar - comment - 1 Apr 2022

I'm sorry, but I have an issue with creating a new method that is a duplicate of the other one and will confuse people. I doubt that we can annotate and document this enough so that people aren't going to be totally confused which one to use, etc. It seems to be the wrong way to go.

I now went a different approach, which should be PHP 8.1 compliant and fixes the issue for now. Unfortunately, I fear this means we need new tests for this. Thank you all for your input and time so far.

avatar richard67 richard67 - change - 1 Apr 2022
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 1 Apr 2022

Back to pending.


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

avatar Hackwar Hackwar - change - 2 Apr 2022
Labels Removed: ? ?
avatar Hackwar
Hackwar - comment - 16 May 2022

@jwaisner could you test this again if this fixes the issue properly?

avatar Hackwar
Hackwar - comment - 17 May 2022

@brianteeman since the initial report came from you, could you maybe give this a test as well, so that we can move this forward?

avatar richard67
richard67 - comment - 17 May 2022

I have tested this item successfully on d819f1b


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

avatar richard67 richard67 - test_item - 17 May 2022 - Tested successfully
avatar nadjak77
nadjak77 - comment - 20 May 2022

I have tested this item successfully on d819f1b


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

avatar nadjak77 nadjak77 - test_item - 20 May 2022 - Tested successfully
avatar richard67 richard67 - change - 20 May 2022
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 20 May 2022

RTC


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

avatar laoneo laoneo - change - 31 May 2022
Labels Added: ?
avatar bembelimen bembelimen - close - 5 Jun 2022
avatar bembelimen bembelimen - merge - 5 Jun 2022
avatar bembelimen bembelimen - change - 5 Jun 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-06-05 19:10:11
Closed_By bembelimen
avatar bembelimen
bembelimen - comment - 5 Jun 2022

Thx

Add a Comment

Login with GitHub to post a comment