Pending

User tests: Successful: Unsuccessful:

avatar wussup
wussup
8 Jul 2024

for SELECT DISTINCT, ORDER BY expressions must appear in select list

Summary of Changes

remove order by for distinct select

Testing Instructions

access com_finder component with query strings: ?task=suggestions.suggest&format=json&tmpl=component&q=eW

Actual result BEFORE applying this Pull Request

error:
42P10, 7, ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 6: ORDER BY t.links DESC,t.weight DESC LIMIT 10
^

Warning: foreach() argument must be of type array|object, bool given in \components\com_finder\src\Model\SuggestionsModel.php on line 54

{ "suggestions": [] }

Expected result AFTER applying this Pull Request

{ "suggestions": [] }

Link to documentations

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar wussup wussup - open - 8 Jul 2024
avatar wussup wussup - change - 8 Jul 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jul 2024
Category Front End com_finder
avatar Hackwar
Hackwar - comment - 21 Jul 2024

Unfortunately this breaks the ordering of the suggestions. This PR unfortunately can't be merged like this.

avatar richard67
richard67 - comment - 21 Jul 2024

Unfortunately this breaks the ordering of the suggestions. This PR unfortunately can't be merged like this.

Then the query needs to be changed so it returns also the columns which are used in the order by, possibly as subquery with the surrounding query returning only the term.

Add a Comment

Login with GitHub to post a comment