J3 Issue ?
avatar zwiastunsw
zwiastunsw
4 Apr 2019

Steps to reproduce the issue

  1. Use Search to search for a popular word (e.g. joomla on a test site)
  2. When you go to the search results page, try sorting the results.
    ordering_39

Expected result

The page is reloaded and the position order is changed according to the selected criterion.

Actual result

Nothing happens

avatar zwiastunsw zwiastunsw - open - 4 Apr 2019
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Apr 2019
avatar zwiastunsw zwiastunsw - change - 4 Apr 2019
The description was changed
avatar zwiastunsw zwiastunsw - edited - 4 Apr 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 Apr 2019

Issue confirmed. Change Results for Example to "Oldes first" and click again on "Search"-Button didn't show oldest Article first (similaer Alphabetical Order).

No Errors on Console.

System information

  • 3.9, latest nightly build
  • Template: Protostar
  • macOS Sierra, 10.13.6
  • Firefox 66 (64-bit)

CloudAccess.net

  • PHP 7.1.27
  • MySQLi 5.7.24-cll-lve
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Status New Confirmed
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Category com_search UI/UX
avatar brianteeman
brianteeman - comment - 4 Apr 2019

Same answer as #24466

avatar infograf768
infograf768 - comment - 4 Apr 2019

Looks like this is due to the $relevance variable in the search content plugin.
It is defined in the query as
$relevance[] = ' CASE WHEN ' . $wheres2[0] . ' THEN 5 ELSE 0 END ';

a var_dump($relevance); gives when searching for "joomla"
array(1) { [0]=> string(67) " CASE WHEN LOWER(a.title) LIKE LOWER('%joomla%') THEN 5 ELSE 0 END " }

Then further, we have.

			if (!empty($relevance))
			{
				$query->select(implode(' + ', $relevance) . ' AS relevance');
				$order = ' relevance DESC, ' . $order;
			}

If I comment $order = ' relevance DESC, ' . $order; then ordering works fine.

Any way it does not change order on the fly. One has to click on Search again.

The $relevance variable was added in #20197
and I (as others) tested it OK at the time...

@alikon ?

avatar infograf768
infograf768 - comment - 4 Apr 2019

NOTE

If I search for something else than "Joomla", then it works OK

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Status Confirmed Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J3 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar alikon
alikon - comment - 13 Apr 2019

apart the "The page is reloaded" for me this is not (strictly) an error but much more a UX problem
for the ordering, for me this is an expected and wanted behaviour as per #20197
we want to give "privilege" when the word is present in the title in the result

avatar zwiastunsw
zwiastunsw - comment - 13 Apr 2019

@alikon : This is an error. When using the keyboard, the page reloads accidentally when you move the cursor to the next number in the list. I cannot decide how many items I want to display.

avatar alikon
alikon - comment - 13 Apr 2019

@zwiastunsw i've analyzed the issue posted
this is a 3rd one ? or I'm wrong ?

avatar zwiastunsw
zwiastunsw - comment - 13 Apr 2019

this is a 3rd one ? or I'm wrong ?

I understand

avatar zwiastunsw
zwiastunsw - comment - 13 Apr 2019

Wait a minute. Sorry. Sorry.
There's only a UX problem here. The filter works for a new search. Earlier @brian Teeman explained.
Therefore, it should be on the site before the search form. Or there should be information that you can change the way you organize the results of the new search.

avatar alikon
alikon - comment - 13 Apr 2019

are you suggesting that some better explanation should be done in the docs.joomla.org ?

avatar zwiastunsw
zwiastunsw - comment - 13 Apr 2019

Just a minute. I'll test it again. Because I have strange behavior.

avatar zwiastunsw
zwiastunsw - comment - 13 Apr 2019
  1. I have reported that after the filter change the page is not overloaded and the results are not arranged according to the selected filter. @brianteeman explained that the filter works only for the new search.
    This is a different behaviour than in the Joomla Backend. If we think that this is the correct behavior, then - in my opinion - the user should be warned about it, e.g. by an appropriate order of forms - first filters, then a search form. Or you need to add a short instruction, e.g. "Set up a new search".
  2. After I reported , @franz-wohlkoenig and @infograf768 noticed that the filter was not working properly. And this is a different, but important issue.
    I tested it. Two filters are not working properly: Alphabetically and Oldest first:

see: Alphabetically
alpha
see Oldest first
olest

avatar brianteeman
brianteeman - comment - 13 Apr 2019

It is not a filter/sort of the results.

It is for new searches. That's why it is positioned next to the search box and not next to the results.

It has always been this way.

avatar zwiastunsw
zwiastunsw - comment - 13 Apr 2019

I accept your opinion.
I think this issue should be closed and a new one should be opened to define the issue of incorrect filter working.

avatar alikon
alikon - comment - 17 Apr 2019

Again the result order give priority when the searched word is present on the title

avatar franz-wohlkoenig franz-wohlkoenig - change - 17 Apr 2019
Title
[3.9.4] Filter Ordering not working
Filter Ordering not working
avatar franz-wohlkoenig franz-wohlkoenig - edited - 17 Apr 2019
avatar brianteeman
brianteeman - comment - 3 Jan 2020

AS stated above by the original reporter this should be closed

avatar Quy Quy - change - 3 Jan 2020
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2020-01-03 23:16:48
Closed_By Quy
avatar Quy Quy - close - 3 Jan 2020

Add a Comment

Login with GitHub to post a comment