? Failure

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
28 Jun 2017

Pull Request for Issue #16903

Summary of Changes

Fix for "CLI scripts print 'Application Instantiation Error' when redis cache enabled"

The error message comes from:
https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/factory.php#L122
https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Factory.php#L137

which means that application instance has not been created yet.

Because on redis handler I stop using JFactory::getApplication() then I had to change other related lines.

Because I can not use $app and I should not display error message to front end:

if ($app->isClient('administrator'))
{
	JError::raiseWarning(500, 'Redis connection failed');
}

I changed it to:

throw new JCacheExceptionConnecting('Could not connect to redis server');

Testing Instructions

Install joomla with cache Redis enabled.

Go to joomla folder and run php -f cli/update_cron.php

Before patch you get error message.
After patch there is no errors.

Expected result

Script works without errors.

Actual result

Get exception message: Application Instantiation Error

Documentation Changes Required

I do not know.

avatar csthomas csthomas - open - 28 Jun 2017
avatar csthomas csthomas - change - 28 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Jun 2017
Category Libraries
avatar csthomas csthomas - change - 29 Jun 2017
Labels Added: ?
avatar zero-24
zero-24 - comment - 29 Jun 2017

Please move the since tag to 'DEPLOY_VERSION' ;)

avatar csthomas
csthomas - comment - 29 Jun 2017

For a while I have a wrong commit with more changes, I removed that. Now IMO there is no place to put DEPLOY_VERSION

avatar zero-24
zero-24 - comment - 29 Jun 2017

Sorry looks like github fools me than a few minutes ago i saw a new method being added here now it is gone. Thanks for checking.

avatar csthomas
csthomas - comment - 29 Jun 2017

There was a new method, but I removed it because it was not part of this PR.

avatar alikon alikon - test_item - 2 Jul 2017 - Tested successfully
avatar alikon
alikon - comment - 2 Jul 2017

I have tested this item successfully on 59a36fd


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

avatar csthomas
csthomas - comment - 27 Aug 2017

I had to fix a conflict and I moved file changes to new location of redis file.

avatar csthomas csthomas - change - 27 Aug 2017
The description was changed
avatar csthomas csthomas - edited - 27 Aug 2017
avatar csthomas
csthomas - comment - 23 Oct 2017

Close this in favour #18395

avatar csthomas csthomas - change - 23 Oct 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-10-23 12:31:12
Closed_By csthomas
avatar csthomas csthomas - close - 23 Oct 2017

Add a Comment

Login with GitHub to post a comment