User tests: Successful: Unsuccessful:
Partial Pull Request for Issue #13357
Similar to #13524 this tries to make the admin LoginModelLogin
class resilient to cache related issues.
The cache handler used is converted to the callback handler versus the base class.
The query is now performed in a lambda function.
Cache exceptions are caught and the lambda function will attempt to be run directly instead.
On a database failure, we're out of luck; sorry.
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.
N/A
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_login |
I have tested this item
I have tested this item
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
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.
Status | Pending | ⇒ | Ready to Commit |
RTC
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:
?
|
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.