Demonstration page is not working.

Installed DrupalForFirebug. Seeing this message on module page and all subsequent page loads.

Notice: Undefined index: devel in DatabaseLog->get() (line 79 of C:\wamp\www\drupal-7-x\drupal_dev_1\includes\database\log.inc).

Also not seeing required features in Firefox - version 10.0.1/ Firebug 1.9.1

Comments

frob’s picture

Status: Active » Postponed

Could 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?

cluther’s picture

Notice: 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

frob’s picture

Status: Postponed » Postponed (maintainer needs more info)

I 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?

frob’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I cannot reproduce this error. I have tried several combinations to reproduce.

rodolphef’s picture

You 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.

frob’s picture

Assigned: Unassigned » frob
Status: Closed (cannot reproduce) » Active

I 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.

My recommandation is to contact the manager of drupalforfirebug and invite him to review the code relative to SQL Query information.

I am a maintainer for drupalforfirebug.

frob’s picture

Status: Active » Postponed

Because 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.

frob’s picture

Assigned: frob » Unassigned
frob’s picture

Title: module showing errors - no drupal tab in firebug » module showing php notices with devel sql logger.
frob’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Component: Firefox Extension » Code
Category: bug » task
Status: Postponed » Needs work

I 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.

markpavlitski’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new716 bytes

The 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 call get() on the log object to just get the queries without altering them.

The attached patch does this.

frob’s picture

Awesome, hopefully the patch will be reviewed soon I am not sure when I will be able to get to it.

manumad40’s picture

It seems that patch at #11 works for me.