? ? Pending

User tests: Successful: Unsuccessful:

avatar izharaazmi
izharaazmi
11 Oct 2017

Summary of Changes

Currently isInstalled does a separate query when called multiple times. Also CMS does not use it anywhere. Changed the implementation of ComponentHelper and ComponentRecord to use the same cached data as in isEnabled

Testing Instructions

ComponentHelper::isInstalled should return correct value for installed and not installed component.

  1. Check if this returns correct values for installed and not installed components:
// Following should normally return true
JComponentHelper::isInstalled('com_content');

// Following should normally return false - unless you really have such component installed. 
JComponentHelper::isInstalled('com_whatever');
  1. Now install some component say com_test and check following
// true
JComponentHelper::isInstalled('com_test');

// true
JComponentHelper::isEnabled('com_test');
  1. Now disable the component com_test in extension manager and check following
// true
JComponentHelper::isInstalled('com_test');

// false
JComponentHelper::isEnabled('com_test');

Documentation Changes Required

Update ComponentRecord doc.

avatar joomla-cms-bot joomla-cms-bot - change - 11 Oct 2017
Category Libraries
avatar izharaazmi izharaazmi - open - 11 Oct 2017
avatar izharaazmi izharaazmi - change - 11 Oct 2017
Status New Pending
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Oct 2017

@izharaazmi can you give more Test Instructions so People with less Dev-Skills can also test?


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

avatar izharaazmi izharaazmi - change - 28 Oct 2017
The description was changed
avatar izharaazmi izharaazmi - edited - 28 Oct 2017
avatar izharaazmi
izharaazmi - comment - 28 Oct 2017

@franz-wohlkoenig Added detailed test instructions. Thanks for pointing out, I was little occupied that day and didn't want to hold the PR.

avatar csthomas csthomas - test_item - 28 Oct 2017 - Tested successfully
avatar csthomas
csthomas - comment - 28 Oct 2017

I have tested this item successfully on a09c979


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

avatar izharaazmi izharaazmi - change - 29 Oct 2017
Labels Added: ?
avatar izharaazmi
izharaazmi - comment - 29 Oct 2017

Simplified code as per the discussion with @Fedik. Please test again.

avatar izharaazmi izharaazmi - change - 29 Oct 2017
The description was changed
avatar izharaazmi izharaazmi - edited - 29 Oct 2017
avatar Fedik
Fedik - comment - 29 Oct 2017

hm, complicated,
it is works, but now it produce warning for "non installed":

screen 2017-10-29 11 14 47 433x95

not really expected ?

avatar Fedik Fedik - test_item - 29 Oct 2017 - Tested successfully
avatar Fedik
Fedik - comment - 29 Oct 2017

I have tested this item successfully on e16de90


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 29 Oct 2017

@csthomas can you please retest?

avatar csthomas csthomas - test_item - 30 Oct 2017 - Tested successfully
avatar csthomas
csthomas - comment - 30 Oct 2017

I have tested this item successfully on e16de90


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Oct 2017
Status Pending Ready to Commit
avatar joomla-cms-bot joomla-cms-bot - edited - 30 Oct 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Oct 2017

RTC after two successful tests.

avatar mbabker mbabker - change - 1 Nov 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-11-01 12:03:36
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 1 Nov 2017
avatar mbabker mbabker - merge - 1 Nov 2017
avatar Hackwar
Hackwar - comment - 2 Nov 2017

Thank you for this change. I just stumbled upon this on a site that got ridiculously slow after upgrading to 3.8.1 and this change removed 140 queries and reduced the time it took for the DB down to a fifth.

avatar izharaazmi
izharaazmi - comment - 3 Nov 2017

@Hackwar Glad that it helped. @infograf768 was the first to point out this issue, thanks to him :)

Add a Comment

Login with GitHub to post a comment