? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
9 Jan 2017

Partial Pull Request for Issue #13357

Summary of Changes

Similar to #13524 this tries to make the admin LoginModelLogin class resilient to cache related issues.

  1. The cache handler used is converted to the callback handler versus the base class.

  2. The query is now performed in a lambda function.

  3. Cache exceptions are caught and the lambda function will attempt to be run directly instead.

  4. On a database failure, we're out of luck; sorry.

Testing Instructions

If the cache store fails to connect or the cache configuration is bad, the exceptions thrown by the cache API should be caught and LoginModelLogin::_load() try to manually execute the lambda function to load the data. A database query failure here should still result in the same error message being displayed. Other types of RuntimeException should now go uncaught and bubble up as this method isn't adequately suited to be a general error handler and now explicitly only deals with error types it can respond to.

Documentation Changes Required

N/A

avatar mbabker mbabker - open - 9 Jan 2017
avatar mbabker mbabker - change - 9 Jan 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Jan 2017
Category Administration com_login
avatar mbabker
mbabker - comment - 29 Jan 2017

Would like some tests here. Getting 3.7 in a state where some of the core API is resilient to cache store errors would be a huge improvement for user experience.

avatar alikon
alikon - comment - 1 Feb 2017

I have tested this item successfully on 88347bc


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

avatar alikon alikon - test_item - 1 Feb 2017 - Tested successfully
avatar csthomas
csthomas - comment - 10 Feb 2017

I have tested this item successfully on 88347bc

It would be good use the shorten version with catch (JCacheException). But better leave it for next PR. Approving each PR takes a long time.

This PR won't resolve all problems. There still needed do be done the same in language file.
17 JLanguageHelper::createLanguageList() /home/tomash/public_html/a4/administrator/modules/mod_login/helper.php:26
18 JLanguageHelper::getInstalledLanguages() /home/tomash/public_html/a4/libraries/joomla/language/helper.php:37
19 JCacheController->__call() /home/tomash/public_html/a4/libraries/joomla/language/helper.php:192
20 JCache->contains() /home/tomash/public_html/a4/libraries/joomla/cache/controller.php:70
21 JCache->_getStorage() /home/tomash/public_html/a4/libraries/joomla/cache/cache.php:195
22 JCacheStorage::getInstance() /home/tomash/public_html/a4/libraries/joomla/cache/cache.php:459


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

avatar csthomas csthomas - test_item - 10 Feb 2017 - Tested successfully
avatar mbabker
mbabker - comment - 10 Feb 2017

I did some of these PRs at the same time I decided to add the interface. So rebasing would be easy and clean it up a bit.

And yes, there are still some places to wrap in an error handler. Hopefully most of them can be tackled before 3.7.

avatar jeckodevelopment jeckodevelopment - change - 11 Feb 2017
Status Pending Ready to Commit
avatar jeckodevelopment
jeckodevelopment - comment - 11 Feb 2017

RTC


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

avatar rdeutz rdeutz - change - 11 Feb 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-11 18:49:14
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 11 Feb 2017
avatar rdeutz rdeutz - merge - 11 Feb 2017

Add a Comment

Login with GitHub to post a comment