? ? Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
10 Oct 2020

Summary of Changes

This fixes #30967. When empty searches are allowed and the search is non-empty, but not matching, then it shouldn't return any results.

Testing Instructions

  1. After installation, insert sample data of choice.
  2. Edit global options of Smart Search and set "Allow Empty Search" to "Yes".
  3. Go to the frontend and open Smart Search for example by accessing index.php?option=com_finder&view=search.
  4. Search for something that definitely is not on the site, like "cockadoodle".

Actual result BEFORE applying this Pull Request

Returns all entries in your index.

Expected result AFTER applying this Pull Request

Returns an empty result.

Documentation Changes Required

none.

avatar Hackwar Hackwar - open - 10 Oct 2020
avatar Hackwar Hackwar - change - 10 Oct 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Oct 2020
Category Front End com_finder
avatar ceford ceford - test_item - 11 Oct 2020 - Tested successfully
avatar ceford
ceford - comment - 11 Oct 2020

I have tested this item successfully on 39c168f

Without patch: 18 results. With patch: 0 results.


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

avatar gostn gostn - test_item - 11 Oct 2020 - Tested successfully
avatar gostn
gostn - comment - 11 Oct 2020

I have tested this item successfully on 39c168f

Thanks for easy to understand test instructions.


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

avatar infograf768
infograf768 - comment - 11 Oct 2020

Silly question maybe, but what is the use of the Allow Empty Search parameter (allow_empty_query)

avatar Hackwar
Hackwar - comment - 11 Oct 2020

You can display your index content right away. For example, if you fill your com_contact with vendors of your product, you could create a menu item that only displays such contacts. So in the frontend you can now always display a list of entries and filter that further via additional taxonomies. I've got several instances, where my customers use this.

avatar infograf768 infograf768 - change - 11 Oct 2020
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 11 Oct 2020

RTC


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

avatar richard67
richard67 - comment - 11 Oct 2020

@Hackwar Any reason why you haven't used type safe comparisons === and !==?

avatar richard67 richard67 - change - 11 Oct 2020
Labels Added: ? ?
avatar ohrionmartin ohrionmartin - test_item - 12 Oct 2020 - Tested successfully
avatar ohrionmartin
ohrionmartin - comment - 12 Oct 2020

I have tested this item successfully on 39c168f

System Information

php: Linux orion 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64
dbserver: mysql
dbversion: 8.0.21-0ubuntu0.20.04.4
dbcollation: utf8mb4_0900_ai_ci
dbconnectioncollation: utf8mb4_0900_ai_ci
dbconnectionencryption:
dbconnencryptsupported: true
phpversion: 7.4.3
server: Apache/2.4.41 (Ubuntu)
sapi_name: apache2handler
version: Joomla! 4.0.0-beta4 Beta [ Mañana ] 15-September-2020 13:46 GMT
useragent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0


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

avatar richard67 richard67 - change - 15 Oct 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-10-15 16:24:48
Closed_By richard67
Labels
avatar richard67 richard67 - close - 15 Oct 2020
avatar richard67 richard67 - merge - 15 Oct 2020
avatar richard67
richard67 - comment - 15 Oct 2020

Thanks!

Add a Comment

Login with GitHub to post a comment