Needs review
Project:
Drupal For Firebug
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Feb 2012 at 17:26 UTC
Updated:
13 Jan 2016 at 22:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
frobCould you please provide more information: such as the version of php you are using and other modules you have installed. What version of devel are you using?
Comment #2
clutherNotice: Undefined index: devel in get() (line 79 of /Users/localhost/Sites/project/includes/database/log.inc).I was getting a similar error on my local development server (drupal 7.14, php 5.24, drupal for firebug 7.x-1.2, devel 7.x-12). I discovered that turning off Devel's "Display query log" stopped the error.
While not a solution it is a work-around.
Best Regards,
Chris
Comment #3
frobI am having a hard time reproducing this. Does this error occur when devel (and Display query Log) is enabled and drupal for firebug is disabled?
Comment #4
frobI cannot reproduce this error. I have tried several combinations to reproduce.
Comment #5
rodolphef commentedYou can reproduce it by activating "drupalforfirebug" and "devel" Module.
This is due to the lines from drupalforfirebug.module file:
// Load the SQL Query Information
global $queries;
$queries = Database::getLog('devel', 'default');
When it gets the log, Drupal Unset the log named "devel"; so your module cannot use it anymore when it gets loaded.
My Call Stack is:
Notice: Undefined index: devel in XXXXXX/includes/database/log.inc on line 79
Call Stack
# Time Memory Function Location
1 0.1462 3853276 _drupal_shutdown_function( ) ../bootstrap.inc:0
2 0.1462 3854008 call_user_func_array ( ???, ??? ) ../bootstrap.inc:3355
3 0.1462 3854200 devel_shutdown_real( ) ../bootstrap.inc:0
4 0.1463 3855792 Database::getLog( ???, ??? ) ../devel.module:1063
5 0.1463 3855792 DatabaseLog->get( ??? ) ../database.inc:1425
My recommandation is to contact the manager of drupalforfirebug and invite him to review the code relative to SQL Query information.
Comment #6
frobI will reopen this issue and again attempt to reproduce. I wasn't getting this error a week ago but I will try it again on a fresh install.
I am a maintainer for drupalforfirebug.
Comment #7
frobBecause this is only showing php Notices I am postponing until issue Extension breaks with version 14 of Firefox is resolved.
This should be a simple fix of turning getLog into startLog but until the other issue is taken care of --we wont really know.
Comment #8
frobComment #9
frobComment #10
frobI am planning on rewriting much of this code for the version 2.x branch. If the code is applicable then I will back port it. Otherwise, patches are welcome.
Comment #11
markpavlitski commentedThe issue is triggered because
Database::getLog()also stops logging and clears the log for the specified key, meaning that devel module can't retrieve it's log.According to the API docs the workaround is to call
Database::startLog()to fetch the log object, and then callget()on the log object to just get the queries without altering them.The attached patch does this.
Comment #12
frobAwesome, hopefully the patch will be reviewed soon I am not sure when I will be able to get to it.
Comment #13
manumad40 commentedIt seems that patch at #11 works for me.