? ? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
4 Feb 2017

Partial Pull Request for Issue #13357

Summary of Changes

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

  1. The database query is now fully stored and executed in a lambda function, this lambda function is passed to the cache controller instead of only instructing it to run JDatabaseDriver::loadObjectList()

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

  3. 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 JComponentHelper::load() try to manually execute the lambda function to load the data. The method currently catches all thrown RuntimeException objects but will now only catch JCacheException objects; in the case of a database error (all the database exceptions extend RuntimeException), we've got a bigger issue and this method shouldn't try to act as an error handler for that type of failure and let the application keep running.

Documentation Changes Required

N/A

avatar mbabker mbabker - open - 4 Feb 2017
avatar mbabker mbabker - change - 4 Feb 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Feb 2017
Category Libraries
avatar mbabker mbabker - change - 4 Feb 2017
Labels Added: ?
avatar alikon
alikon - comment - 6 Feb 2017

I have tested this item successfully on 2a90389


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

avatar alikon alikon - test_item - 6 Feb 2017 - Tested successfully
avatar csthomas
csthomas - comment - 6 Feb 2017

I have tested this item successfully on 2a90389


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

avatar csthomas csthomas - test_item - 6 Feb 2017 - Tested successfully
avatar zero-24 zero-24 - change - 6 Feb 2017
Milestone Added:
Status Pending Ready to Commit
Labels Added: ?
avatar rdeutz rdeutz - close - 8 Feb 2017
avatar rdeutz rdeutz - merge - 8 Feb 2017
avatar rdeutz rdeutz - change - 8 Feb 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-08 14:06:39
Closed_By rdeutz
Labels

Add a Comment

Login with GitHub to post a comment