Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
my watchdog keeps filling up with this notice.
Notice: Undefined index: devel in DatabaseLog->get() (line 80 of /home/wicked/public_html/dev/includes/database/log.inc).
does anyone else have this, or know whats causing it?
thanks.
Comment | File | Size | Author |
---|---|---|---|
#8 | devel_log_warning.1087156.8.patch | 491 bytes | salvis |
#6 | devel_log_warning.1087156.6.patch | 574 bytes | salvis |
Comments
Comment #1
salvisIf you're wicked enough then try enabling Devel's Backtrace Error Handler to find out where the call comes from.
There's a certain risk that this may result in WSODs (white screen of death). If you're not confident that you'll be able to recover, then don't try this.
Comment #2
chriz001 CreditAttribution: chriz001 commentedwicked enough, lol
Devel's Backtrace Error Handler is pretty cool :)
here is what it says:
get (Array, 7 elements)
getLog (Array, 6 elements)
devel_shutdown_real (Array, 2 elements)
call_user_func_array (Array, 4 elements)
_drupal_shutdown_function (Array, 2 elements)
it mentions line 964 in sites\all\modules\devel\devel.module which says:
$queries = Database::getLog('devel', 'default');
what should i look at next?
thanks!
Comment #3
chriz001 CreditAttribution: chriz001 commentedfriendly bump :)
Comment #4
salvisSorry...
The call is http://api.drupal.org/api/drupal/includes--database--database.inc/functi...
in devel_shutdown_real(). This is ok, provided that
has been called in devel_boot(), and the latter depends on devel_query_enabled().
Database::getLog()...
... calls DatabaseLog::get('devel'):
This causes your warning. On my test site, getLog() above takes the first exit, but apparently it does not for you.
Have you activated some kind of database logging? Try turning it off and tell us what happens.
I would think that adding an additional condition to...
in devel_shutdown_real() to make it look like
should take care of your problem.
Comment #5
chriz001 CreditAttribution: chriz001 commentedWow, such an awesome responce, thanks!
OK, if i turn off the database logging module, i still see the error at the bottom of every page with the Backtrace error handler enabled.
If i have the standard drupal error handler, with the database logging module disabled i dont see the error.
but if the database logging module is enabled, it gets the same entry every page view, at least from the admin account.
If i change the devel_shutdown_real() function as you suggested, everything works fine! :)
any idea why my drupal install is acting differently? seems a bit strange.
thankyou very much!
Comment #6
salvisSearch through your entire Drupal source code for
Database::startLog(
— maybe you find another module that starts a log?Here's the patch.
Comment #7
chriz001 CreditAttribution: chriz001 commentedHi,
I did the search and it comes up 7 times under the simpletest module and 2 times under the devel module, thats all.
Also i noticed that this patch stops the 'Display page timer' and 'Display memory usage' features of devel from working.
Comment #8
salvisSeems like we won't find out why this behaves differently for you.
Here's an updated patch.
Comment #9
ogi CreditAttribution: ogi commentedThe patch in #8 fixed the notice in my installation.
Comment #10
salvisCommitted, thanks!
Comment #11
chriz001 CreditAttribution: chriz001 commentedWorked for me too, Thankyou!
Comment #13
sonicthoughts CreditAttribution: sonicthoughts commentedI get this error - was this patch committed?
Comment #14
salvisYes
The changed line is line 1064 in the current D7 HEAD.
Please open a new issue and paste the full message that you get.
Comment #15
warmth CreditAttribution: warmth commentedI'm getting this issue today after enabling some cache, performance modules and Facebook developement tools:
Notice: Undefined index: devel in DatabaseLog->get() (line 79 of /home/MYSITE/www/SUBFOLDER/includes/database/log.inc).
Comment #16
jca CreditAttribution: jca commentedI'm still getting the same notice:
Notice: Undefined index: devel in DatabaseLog->get()
Comment #17
salvisPlease think again whether it makes sense to go back to the 2012-Jun-05 version and be surprised that it's still behaving like the 2012-Jun-05 version...
If you see this in the current -dev version, then follow #14.