Updates Requested bug PR-4.4-dev PR-5.2-dev 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.

avatar HLeithner
HLeithner - comment - 15 Nov 2024

This pull request has been automatically rebased to 5.2-dev.

avatar HLeithner HLeithner - change - 15 Nov 2024
Title
fix PostgreSQL error
[5.2] fix PostgreSQL error
avatar HLeithner HLeithner - edited - 15 Nov 2024
avatar Hackwar Hackwar - close - 21 Nov 2024
avatar Hackwar
Hackwar - comment - 21 Nov 2024

Thank you @wussup for this PR. As I wrote, this would unfortunately break the ordering of the suggestions. In the meantime @alikon has created a new PR #44384 which should fix this in the "right" way. Because of that I'm closing this one. Thank you for your work and I hope to keep seeing you around. 😀

avatar Hackwar Hackwar - change - 21 Nov 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-11-21 18:07:42
Closed_By Hackwar
Labels Added: Updates Requested bug PR-4.4-dev PR-5.2-dev
avatar Hackwar
Hackwar - comment - 21 Nov 2024

The other PR requires just one more test and then we can merge this into 5.2.3 finally. Maybe you want to have a look and be that last test. 😉

avatar wussup
wussup - comment - 22 Nov 2024

The other PR requires just one more test and then we can merge this into 5.2.3 finally. Maybe you want to have a look and be that last test. 😉

Hi, thank you for the information. I can not test it now, but it looks good for me. :)

Add a Comment

Login with GitHub to post a comment