? ? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
8 Jan 2017

Summary of Changes

Gracefully handle cache related errors in com_cache versus hitting the error page.

  1. Catch some exceptions when trying to read data from the cache store and display a relevant message related to the failure.

  2. Clean and purge operations should also catch these exceptions to notify the calling code of an error state. The controller methods are already checking for boolean false returns so the error handling already exists.

  3. Remove a useless casting from boolean to integer.

Testing Instructions

When the cache can't be reached for read, clean, or purge operations, the error conditions should be gracefully handled versus fatal errors.

Documentation Changes Required

N/A

avatar mbabker mbabker - open - 8 Jan 2017
avatar mbabker mbabker - change - 8 Jan 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2017
Category Administration com_cache Language & Strings
avatar csthomas
csthomas - comment - 19 Jan 2017

Sometimes I think that joomla should remove empty() function from whole project and replace it with !== or similar.
For me if (empty($var)) is equal to if (isset($var) && $var)

avatar mbabker
mbabker - comment - 29 Jan 2017

Displaying the message three times probably means there's a way to optimize the code to not run other functions if fetching the base data fails, but I'd consider that outside scope of this PR. The main thing to accomplish here is to block an unhandled Exception thrown by reading from the cache store and have a semi-graceful fallback.

avatar csthomas
csthomas - comment - 30 Jan 2017

I have tested this item successfully on 76179e7

I set up cache handler as memcached and turn it off in joomla. Then go to clear cache and I saw message as I mentioned before.


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

avatar csthomas csthomas - test_item - 30 Jan 2017 - Tested successfully
avatar alikon alikon - test_item - 7 Mar 2017 - Tested successfully
avatar alikon
alikon - comment - 7 Mar 2017

I have tested this item successfully on 76179e7


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

avatar jeckodevelopment jeckodevelopment - change - 7 Mar 2017
Status Pending Ready to Commit
avatar jeckodevelopment
jeckodevelopment - comment - 7 Mar 2017

RTC


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

avatar wilsonge wilsonge - change - 9 Mar 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-03-09 16:44:15
Closed_By wilsonge
Labels Added: ? ?
avatar wilsonge wilsonge - close - 9 Mar 2017
avatar wilsonge wilsonge - merge - 9 Mar 2017

Add a Comment

Login with GitHub to post a comment