? ? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
18 Feb 2017

Summary of Changes

Improve the cache use in BannersModelBanner::getItem() and remove a duplicated query.

  1. Use the callback cache controller for reading from the cache instead of the base controller class.
  2. Currently this method runs both $db->execute() and $db->loadObject() resulting in two queries, removes the $db->execute() call.
  3. Handles cache exceptions and ignores other exceptions. Right now it's catching all thrown RuntimeException objects and calling JError::raiseError() which results in the error page being displayed. So there's really no point in trying to handle other errors here, let those bubble up the stack and hit the global handler which does the same if nothing else catches it (if a caller wanted to they could now have some sort of graceful fallback for other error conditions versus the model directly triggering the error page with no option of doing anything else; models are really a bad place to be calling JError at all).

Testing Instructions

A banner should still be read and used correctly when loaded through this model method.

avatar mbabker mbabker - open - 18 Feb 2017
avatar mbabker mbabker - change - 18 Feb 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Feb 2017
Category Front End com_banners
avatar joomdonation joomdonation - test_item - 19 Feb 2017 - Tested unsuccessfully
avatar joomdonation
joomdonation - comment - 19 Feb 2017

I have tested this item ? unsuccessfully on 421dfa6

Received error below after applying the patch:

1054 Unknown column 'a.clickurl' in 'field list'


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14138.
avatar ladyjer ladyjer - test_item - 19 Feb 2017 - Tested unsuccessfully
avatar ladyjer
ladyjer - comment - 19 Feb 2017

I have tested this item ? unsuccessfully on 421dfa6

Same error here, after click on banner I received:

1054 Unknown column 'a.clickurl' in 'field list'


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

avatar mbabker mbabker - change - 19 Feb 2017
Labels Added: ?
avatar joomdonation joomdonation - test_item - 19 Feb 2017 - Tested successfully
avatar joomdonation
joomdonation - comment - 19 Feb 2017

I have tested this item successfully on 71e38e6

Works OK now, thanks.


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

avatar ladyjer ladyjer - test_item - 20 Feb 2017 - Tested successfully
avatar ladyjer
ladyjer - comment - 20 Feb 2017

I have tested this item successfully on 71e38e6


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Feb 2017

RTC as 2 successfully Tests?

avatar dgt41 dgt41 - change - 22 Feb 2017
Status Pending Ready to Commit
avatar dgt41
dgt41 - comment - 22 Feb 2017

RTC


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Feb 2017

thanks @dgt41

avatar rdeutz rdeutz - change - 22 Feb 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-22 17:03:09
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 22 Feb 2017
avatar rdeutz rdeutz - merge - 22 Feb 2017

Add a Comment

Login with GitHub to post a comment