? Success

User tests: Successful: Unsuccessful:

avatar alikon
alikon
8 Apr 2015

updated to handle DB errors like #6612, #6632 and for #6591

Testing info
simulate a db error

avatar alikon alikon - open - 8 Apr 2015
avatar joomla-cms-bot joomla-cms-bot - change - 8 Apr 2015
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 8 Apr 2015
Labels Added: ?
avatar alikon alikon - reference | - 8 Apr 15
avatar zero-24 zero-24 - change - 8 Apr 2015
Category Plugins SQL
avatar zero-24 zero-24 - reference | - 8 Apr 15
avatar alikon alikon - reference | - 9 Apr 15
avatar alikon alikon - reference | - 9 Apr 15
avatar alikon alikon - reference | - 9 Apr 15
avatar alikon alikon - reference | - 9 Apr 15
avatar wilsonge wilsonge - change - 9 Apr 2015
Milestone Added:
avatar sovainfo
sovainfo - comment - 10 Apr 2015

The errors should be logged and currently that requires proper configuration of debug. Consider that not sufficient. The product should have a logger enabled for errors.

avatar mbabker
mbabker - comment - 10 Apr 2015

It can be default enabled but there are conditions to keep in mind:

  • A hosting platform where Joomla can't write log files (due to poor config or a user implementing extra "security" measures)
  • Failing to write to the log shouldn't trigger a fatal error (I think I've seen instances where this may happen, in part due to the lack of permissions)
  • Reviewing where we are actually using JLog now. We have a log callback that enqueues messages for the 'jerror' log category (which IMO is really not optimal; if we want to log and display a message just call both...). We don't want to be writing logs on every request a site gets; those files blow up pretty quickly, especially if catching deprecations or logging all database queries.

On Friday, April 10, 2015, sovainfo notifications@github.com wrote:

The errors should be logged and currently that requires proper
configuration of debug. Consider that not sufficient. The product should
have a logger enabled for errors.


Reply to this email directly or view it on GitHub
#6710 (comment).

avatar sovainfo
sovainfo - comment - 10 Apr 2015

Guess you missed the second word: ERROR
Added this to cms.php:
JLog::addLogger(array(), JLog::ERROR, array('deprecated'), true);
Then created an error in the featured query, it was logged and embarrassingly enough also shown:
component error handling

avatar alikon
alikon - comment - 10 Apr 2015

the point is how the core modules,plugins,ect handle db errors ( #6591 ) ?

showing a generic message

JFactory::getApplication()->enqueueMessage('blah blah ', 'warning');

or something different like

if (JFactory::getUser()->authorise('core.admin'))
{
 JLog::addLogger("blla bla");  
........
}

i would prefer the keep it simplest stupid "bla bla" msg

but not sure to understand what exactly is the "family feeling"

i'm missing something?

p.s
a special thanks to all #pbfnl

avatar wilsonge
wilsonge - comment - 7 May 2015

Me and @roland-d just had a chat about this. We have made an executive call that we show a generic "blah blah" message to users and then just add the exception message into the Logs. Just make sure it isn't in a category that will be shown to the frontend user.

avatar alikon alikon - change - 10 May 2015
Milestone Removed:
avatar alikon
alikon - comment - 10 May 2015

done
i've used a ready lang string maybe something different?

avatar wilsonge
wilsonge - comment - 11 May 2015

I think probably something different. I'll ping @brianteeman in the language string group on glip

avatar roland-d
roland-d - comment - 28 May 2015

@wilsonge Any update on this?

avatar wilsonge
wilsonge - comment - 28 May 2015

@brianteeman recommended as it's a string to frontend users we either display a hugely simplified string of "There has been an error" or don't show a string at all.

avatar alikon alikon - reference | 973b76c - 30 May 15
avatar alikon alikon - reference | 5ba3f0c - 30 May 15
avatar alikon alikon - reference | d44d525 - 30 May 15
avatar alikon alikon - reference | 9cfc0ef - 30 May 15
avatar alikon alikon - reference | 1476955 - 30 May 15
avatar alikon alikon - reference | 4c681ba - 30 May 15
avatar alikon alikon - reference | 510f4fa - 30 May 15
avatar alikon alikon - reference | ca99fe8 - 30 May 15
avatar alikon alikon - reference | 8d17272 - 30 May 15
avatar alikon alikon - reference | 40fe080 - 30 May 15
avatar alikon alikon - reference | 317820a - 30 May 15
avatar roland-d
roland-d - comment - 9 Jun 2015

@test Works as described, after generating an error, I get a simple error message that the database connection is not there.

To test, I changed the plugins/search/categories/categories.php file on line 152 and changed THEN to THN. On the frontend, I used the search function to search categories only and received the error page with a large DB query. After applying the patch and making the same change, I now receive a graceful message.

avatar roland-d roland-d - test_item - 9 Jun 2015 - Tested successfully
avatar alikon
alikon - comment - 9 Jun 2015

@roland-d i'm sorry for my pr patchworks
look at this one please #7073

p.s
maybe this one could be closed

avatar roland-d
roland-d - comment - 9 Jun 2015

@alikon There are a lot of these db PRs. Is there a comprehensive list with all of them that should be tested?

avatar alikon
alikon - comment - 9 Jun 2015

@roland-d my search string

is:open is:pr author:alikon Handle DB 

;)

avatar designbengel
designbengel - comment - 9 Jun 2015

Did same testing procedure like @roland-d - successfull


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

avatar designbengel designbengel - test_item - 9 Jun 2015 - Tested successfully
avatar zero-24 zero-24 - change - 9 Jun 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 9 Jun 2015

RTC :smile:


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

avatar zero-24 zero-24 - change - 9 Jun 2015
Labels Added: ?
avatar wilsonge
wilsonge - comment - 14 Jun 2015

Closing in favour of #7073

avatar wilsonge wilsonge - change - 14 Jun 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-06-14 22:59:16
Closed_By wilsonge
avatar wilsonge wilsonge - close - 14 Jun 2015
avatar wilsonge wilsonge - close - 14 Jun 2015
avatar wilsonge wilsonge - close - 14 Jun 2015
avatar wilsonge wilsonge - change - 14 Jun 2015
Labels Removed: ?
avatar zero-24 zero-24 - change - 15 Jun 2015
Milestone Removed:

Add a Comment

Login with GitHub to post a comment