PR-5.1-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 wussup wussup - change - 8 Jul 2024
The description was changed
avatar wussup wussup - edited - 8 Jul 2024
avatar richard67
richard67 - comment - 8 Jul 2024

@wussup Thanks a lot for your pull request. By review it looks good to me. However, it seems the bug also exists in 4.4-dev: https://github.com/joomla/joomla-cms/blob/4.4-dev/components/com_finder/src/Model/SuggestionsModel.php#L95-L100
So it should be fixed in 4.4-dev. Release managers will later merge it up into the 5.x-dev and 6.0-dev branches when it has been fixed in 4.4-dev.

Could you rebase our PR to 4.4-dev, or if it's easier for you just make a new one for the 4.4-dev branch?

Thanks in advance.

avatar wussup
wussup - comment - 8 Jul 2024

@wussup Thanks a lot for your pull request. By review it looks good to me. However, it seems the bug also exists in 4.4-dev: https://github.com/joomla/joomla-cms/blob/4.4-dev/components/com_finder/src/Model/SuggestionsModel.php#L95-L100 So it should be fixed in 4.4-dev. Release managers will later merge it up into the 5.x-dev and 6.0-dev branches when it has been fixed in 4.4-dev.

Could you rebase our PR to 4.4-dev, or if it's easier for you just make a new one for the 4.4-dev branch?

Thanks in advance.

@richard67 I made a new pull request:
#43759

avatar richard67 richard67 - close - 8 Jul 2024
avatar richard67 richard67 - change - 8 Jul 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-07-08 14:36:57
Closed_By richard67
Labels Added: PR-5.1-dev
avatar richard67
richard67 - comment - 8 Jul 2024

@wussup Thanks. Closing in favour of #43759 .

Add a Comment

Login with GitHub to post a comment