User tests: Successful: Unsuccessful:
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
I have tested this item
I have tested this item
I have applied instructions provided and the "order by" keeps showing:
SELECT l.link_id, l.object,SUM(m.weight) AS ordering
FROM vuu2c_finder_links AS l
INNER JOIN vuu2c_finder_links_terms
AS m ON m.link_id = l.link_id
WHERE l
.access
IN (:preparedArray1,:preparedArray2,:preparedArray3) AND l.state = 1 AND l.published = 1 AND (l.publish_start_date IS NULL OR l.publish_start_date <= '2021-09-17 15:45:00') AND (l.publish_end_date IS NULL OR l.publish_end_date >= '2021-09-17 15:45:00') AND l.language IN ('en-GB', '*') AND m.term_id IN (1836)
GROUP BY l.link_id,l.object
HAVING SUM(CASE WHEN m.term_id IN (1836) THEN 1 ELSE 0 END) > 0
ORDER BY ordering DESC LIMIT 20
I have tested this item
? unsuccessfully on 41bbe97I have applied instructions provided and the "order by" keeps showing:
SELECT l.link_id, l.object,SUM(m.weight) AS ordering
FROM vuu2c_finder_links AS l
INNER JOINvuu2c_finder_links_terms
AS m ON m.link_id = l.link_id
WHEREl
.access
IN (:preparedArray1,:preparedArray2,:preparedArray3) AND l.state = 1 AND l.published = 1 AND (l.publish_start_date IS NULL OR l.publish_start_date <= '2021-09-17 15:45:00') AND (l.publish_end_date IS NULL OR l.publish_end_date >= '2021-09-17 15:45:00') AND l.language IN ('en-GB', '*') AND m.term_id IN (1836)
GROUP BY l.link_id,l.object
HAVING SUM(CASE WHEN m.term_id IN (1836) THEN 1 ELSE 0 END) > 0
ORDER BY ordering DESC LIMIT 20
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35383.
@carcam I think you have mixed up the queries. There are 2 identical ones, one for getting the list items and another second one for getting the count. This PR here modifies that for the count. I.e. before ther PR there are 2 queries with ordering, and with this PR there is only one. You have to check that one which does not have the LIMIT clause. Please revert your wrong test result. Thanks in advance.
I can confirm that this code does not seem to get triggered by smart search while i agree that we should clear the order thing in generally too. Will merge this based on the test by @bembelimen and @richard67 's and mine review.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-09-17 23:47:15 |
Closed_By | ⇒ | zero-24 |
@alikon Same as it was with the other PR at the beginning: Please change the comment in this line here
joomla-cms/libraries/src/MVC/Model/BaseDatabaseModel.php
Line 359 in 5b7b2b0
to
// Remove the limit, offset and order parts if it's a \JDatabaseQuery object
I would have made a suggestion on GitHub but that doesn't work if the place of the suggestion in code is too far away from the code changed in a PR.