We receive the following error whenever a user lands on the homepage:

PHP Notice: Undefined index: q in ..../sites/all/modules/droptor/droptor.module on line 150

This is because on the homepage, the value of $_GET['q'] is not set.

Comments

jemond’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this with Drupal 6 or 7. What is the value of your site_frontpage variable?

andrewsuth’s picture

Status: Postponed (maintainer needs more info) » Active

We're experiencing the problem on all Drupal 6 platforms which have Droptor installed, so this does not seem to be a fringe case. It only happens on the homepage, where $_GET['q'] appears not to be set at this point in the execution process.

Perhaps it is due to the following (from bootstrap.inc):

      // If there is a cached page, display it.
      if (is_object($cache)) {
        header('X-Drupal-Cache: HIT');
        drupal_page_cache_header($cache);
        // If the skipping of the bootstrap hooks is not enforced, call hook_exit.
        if ($cache_mode != CACHE_AGGRESSIVE) {
          bootstrap_invoke_all('exit');
        }
        // We are done.
        exit;
      }

I think this is important as it is called in the sixth bootstrap phase, where as $_GET['q'] is set in the eighth phase. So the variable is not as yet set. But it only seems to affect the homepage (?).

It is an unusual condition as it causes errors on every homepage load on one platform but on every third load on another.

jemond’s picture

Status: Active » Needs review

Thanks for the additional information. Now I'm clear. This is indeed a bug. I just pushed a fix to the 3.x branch for D6 and D7. Would you give that a try and let me know if that fixes the issue?

Thanks again for taking the time report this;

jemond’s picture

Status: Needs review » Fixed

Assume fixed. Please re-open if you have any more problems on this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.