? Success

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
7 Aug 2016

Summary of Changes

Do not generate sql query twice: on getItems and on getTotal.

Remove $this->setState('list.ordering', ... from getListQuery method and move it to populateState.

Testing Instructions

1) Create a menu item for com_content featured view.
a) Set Category Order: No Order
b) Set Article Order: Author Alphabetical

2) Create a second menu item for com_content archive view
a) Set Article Order as Title Alphabetical

3) Add debug info:
a) at the top of method getListQuery:
https://github.com/joomla/joomla-cms/blob/staging/components/com_content/models/featured.php#L121
replace { by:

{echo "<code>getListQuery RUN</code>";

b) Do the same for https://github.com/joomla/joomla-cms/blob/staging/components/com_content/models/archive.php#L72

4) Go to the first menu item. You should see text "getListQuery RUN" twice.
5) Go to the second menu item. You should see text "getListQuery RUN" twice.

6) Apply this PR and also add debug info at the top of method getListQuery.

7) Go to the first menu item. You should see text "getListQuery RUN" only once.
8) Go to the second menu item. You should see text "getListQuery RUN" only once.

Votes

# of Users Experiencing Issue
0/1
Average Importance Score
1.00

avatar joomla-cms-bot joomla-cms-bot - change - 7 Aug 2016
Category Front End Components
avatar csthomas csthomas - open - 7 Aug 2016
avatar csthomas csthomas - change - 7 Aug 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Aug 2016
Labels Added: ?
avatar Sieger66 Sieger66 - test_item - 15 Aug 2016 - Tested successfully
avatar Sieger66
Sieger66 - comment - 15 Aug 2016

I have tested this item successfully on 115b93b


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11509.

avatar BhaveshTailored BhaveshTailored - test_item - 24 Aug 2016 - Tested successfully
avatar BhaveshTailored
BhaveshTailored - comment - 24 Aug 2016

I have tested this item successfully on 115b93b


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11509.

avatar bhavikTailored bhavikTailored - test_item - 24 Aug 2016 - Tested successfully
avatar bhavikTailored
bhavikTailored - comment - 24 Aug 2016
avatar bhavikTailored
bhavikTailored - comment - 24 Aug 2016

I have tested this item successfully on 115b93b


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11509.

avatar csthomas
csthomas - comment - 29 Aug 2016

@brianteeman Can I ask for RTC / milestone?

avatar alikon
alikon - comment - 30 Aug 2016

don't work for me enabling the debug plugin the number of executed queries are the same with and without the patch (tested only featured)
i'm testing on a clean current stage with multilanguage enabled
1 featured article for 3 languages

avatar csthomas
csthomas - comment - 30 Aug 2016

I have mentioned only that above queries are only generated, method getListQuery() was run twice but once is enough.

avatar csthomas
csthomas - comment - 30 Aug 2016

IIRC the details are (before PR):

  • getTotal() generate a query in getListQuery() method, modifies a little, and executes it.
  • getItems() generate a new query (but should use previous one) and executes it.
avatar csthomas csthomas - change - 30 Aug 2016
The description was changed
avatar csthomas csthomas - edited - 30 Aug 2016
avatar alikon
alikon - comment - 30 Aug 2016

sorry for the missunderstanding, consider my previous comment as a successfull non-regression test ;)

avatar alikon alikon - test_item - 30 Aug 2016 - Tested successfully
avatar alikon
alikon - comment - 30 Aug 2016

I have tested this item successfully on


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11509.

avatar csthomas
csthomas - comment - 4 Sep 2016

@rdeutz RTC please

avatar zero-24 zero-24 - alter_testresult - 4 Sep 2016 - alikon: Tested successfully
avatar zero-24 zero-24 - change - 4 Sep 2016
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 4 Sep 2016

RTC based on the recored tests


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11509.

avatar joomla-cms-bot joomla-cms-bot - change - 4 Sep 2016
Labels Added: ?
avatar rdeutz rdeutz - change - 7 Sep 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-09-07 07:45:26
Closed_By rdeutz
avatar rdeutz rdeutz - close - 7 Sep 2016
avatar rdeutz rdeutz - merge - 7 Sep 2016
avatar joomla-cms-bot joomla-cms-bot - close - 7 Sep 2016
avatar joomla-cms-bot joomla-cms-bot - change - 7 Sep 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment