? ? Success

User tests: Successful: Unsuccessful:

avatar alikon
alikon
14 Feb 2018

Summary of Changes

the same query is executed once

Testing Instructions

  • in a multilanguage site
  • enable debug
  • #19682 (comment)
  • look at debug database duplicated queries

Expected result

no duplicated queries

Actual result

duplicate queries one of them is this one

screenshot from 2018-02-14 21-04-06

avatar alikon alikon - open - 14 Feb 2018
avatar alikon alikon - change - 14 Feb 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2018
Category Administration com_categories
avatar alikon alikon - change - 14 Feb 2018
The description was changed
avatar alikon alikon - edited - 14 Feb 2018
avatar alikon alikon - change - 14 Feb 2018
The description was changed
avatar alikon alikon - edited - 14 Feb 2018
c9658d4 14 Feb 2018 avatar alikon cs
avatar alikon alikon - change - 14 Feb 2018
Labels Added: ?
avatar ethernidee
ethernidee - comment - 14 Feb 2018

What do you think about renaming $filters to something like $cachedAssociations? Perhaps, it will be clearer, what is stored inside.

FILE: ...omla-cms/administrator/components/com_categories/helpers/categories.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
140 | ERROR | Space before closing parenthesis of function call prohibited
avatar alikon
alikon - comment - 17 Feb 2018

from my personal pov is explained in declaration Cached array of the category item id.
but if you feel that renaming is better .... the pr branch is public....

avatar Quy
Quy - comment - 9 Mar 2018

The return values are different.

Before PR:

array(2) {
  ["fr-FR"]=>
  string(18) "11:categorie-fr-fr"
  ["es-ES"]=>
  string(18) "12:categoria-es-es"
}

After PR:

array(2) {
  ["fr-FR"]=>
  string(2) "11"
  ["es-ES"]=>
  string(2) "12"
}
avatar ladyjer
ladyjer - comment - 5 Apr 2018

I have tested this item successfully on 7d724e0


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

avatar ladyjer ladyjer - test_item - 5 Apr 2018 - Tested successfully
avatar Quy Quy - test_item - 27 Apr 2018 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Apr 2018

@ladyjer can you please retest?

avatar infograf768
infograf768 - comment - 28 Apr 2018

Notice: Undefined variable: assocId in /Applications/MAMP/htdocs/installmulti/trunkgitnew/administrator/components/com_categories/helpers/categories.php on line 135

Warning: implode(): Invalid arguments passed in /Applications/MAMP/htdocs/installmulti/trunkgitnew/administrator/components/com_categories/helpers/categories.php on line 135

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND published = 1 AND access IN (1,1,5)' at line 3

2d30362 28 Apr 2018 avatar alikon typo
avatar infograf768
infograf768 - comment - 28 Apr 2018

Test instructions should be updated.
This PR (after last correction) is checking duplicate queries of associated categories, NOT category menu items.
We can indeed associate category menu items without ever associating the categories concerned.

Therefore, to test, one should not associate the menu items, only the categories concerned.

Needs totally new tests.

avatar alikon alikon - change - 28 Apr 2018
The description was changed
avatar alikon alikon - edited - 28 Apr 2018
avatar alikon
alikon - comment - 28 Apr 2018

updated

Needs totally new tests.

?

avatar Quy
Quy - comment - 6 May 2018

I have tested this item successfully on 2d30362


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

avatar Quy Quy - test_item - 6 May 2018 - Tested successfully
avatar csthomas
csthomas - comment - 8 May 2018

@alikon Are you sure we need static::$filters at all?

Before, the sql query was executed inside a loop, now it is executed outside. I have not yet tested it.

avatar viocassel
viocassel - comment - 3 Feb 2019

I have tested this item successfully on 2d30362


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

avatar viocassel viocassel - test_item - 3 Feb 2019 - Tested successfully
avatar Quy Quy - change - 3 Feb 2019
Status Pending Ready to Commit
avatar Quy
Quy - comment - 3 Feb 2019

RTC


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Apr 2019
Title
[com_categories][Multilanguage] - remove duplicated queries
remove duplicated queries
avatar franz-wohlkoenig franz-wohlkoenig - edited - 19 Apr 2019
avatar alikon
alikon - comment - 2 May 2019

@HLeithner please a final response

1 year old rtc pr

avatar HLeithner
HLeithner - comment - 10 May 2019

@alikon thx for you work but this is an optimization that should go into j4 and not in j3 because it doesn't fix a bug...

If this query still exists in j4 it would be great if you could rebase this pr to 4.0-dev

ymmv

avatar HLeithner HLeithner - close - 10 May 2019
avatar HLeithner HLeithner - change - 10 May 2019
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2019-05-10 12:49:38
Closed_By HLeithner
Labels Removed: J3 Issue

Add a Comment

Login with GitHub to post a comment