I've updated an offline duplicate of my site to 5.9, from 5.7

I followed the upgrade.txt to the letter and took the site offline, disabled all contrib modules then upgraded everything apart from the sites, files and temp folders.

On my home page i get the following errors now if i'm logged out:

Notice: Undefined index: q in /Users/macintosh/Sites/monkey/sites/all/modules/bio/bio.module on line 8

Warning: Cannot modify header information - headers already sent by (output started at /Users/macintosh/Sites/monkey/sites/all/modules/bio/bio.module:8) in /Users/macintosh/Sites/monkey/includes/bootstrap.inc on line 565

Warning: Cannot modify header information - headers already sent by (output started at /Users/macintosh/Sites/monkey/sites/all/modules/bio/bio.module:8) in /Users/macintosh/Sites/monkey/includes/bootstrap.inc on line 566

Warning: Cannot modify header information - headers already sent by (output started at /Users/macintosh/Sites/monkey/sites/all/modules/bio/bio.module:8) in /Users/macintosh/Sites/monkey/includes/bootstrap.inc on line 569

Warning: Cannot modify header information - headers already sent by (output started at /Users/macintosh/Sites/monkey/sites/all/modules/bio/bio.module:8) in /Users/macintosh/Sites/monkey/includes/bootstrap.inc on line 570

Warning: Cannot modify header information - headers already sent by (output started at /Users/macintosh/Sites/monkey/sites/all/modules/bio/bio.module:8) in /Users/macintosh/Sites/monkey/includes/bootstrap.inc on line 578

Warning: Cannot modify header information - headers already sent by (output started at /Users/macintosh/Sites/monkey/sites/all/modules/bio/bio.module:8) in /Users/macintosh/Sites/monkey/includes/bootstrap.inc on line 586

removing the first function in the bio module at line 8 fixes the issue, but i don't want to do that. I've a number of custom modules on the site and i've tried disabling all of those that didn't work. One weird thing that works temporarily is going to Site Maintenance making sure the Online radio button is checked and submitting the form. In a different browser in which im logged out the home page re-appears, but if i refresh it I get the above errors again. If i take the site offline then try to go back online again it appears to be online, but i get the following in the message box:

* Operating in off-line mode.
* The configuration options have been saved.

Even though below that the radio button for Online is selected. So this issue may be related to Site Maintenance. Every other page in the site including user bios work fine.

Has anyone experienced anything similar or offer any pointers. (I may have to stick with 5.7 otherwise which i don't really want to do)

Comments

amcc’s picture

The problem seems to be related to caching - disabling caching fixes the problem, but the subsequent re-enabling of caching (i'm using 'normal') brings back the errors.

I enabled Devel module and cleared the cache - this doesn't fix it, but enabling the Devel module brought additional errors:


Notice: Undefined index: q in /Users/macintosh/Sites/monkey/sites/all/modules/devel/devel.module on line 217

Notice: Undefined index: q in /Users/macintosh/Sites/monkey/sites/all/modules/devel/devel.module on line 217

Notice: Undefined index: q in /Users/macintosh/Sites/monkey/sites/all/modules/devel/devel.module on line 217

the function in bio causing the problem is below:

function bio_init() {
  if ($_GET['q'] == 'node/add/'.variable_get('bio_nodetype', 'bio')) {
    if (($nid = bio_for_user()) && !user_access('administer nodes')) {
      drupal_goto('node/'.$nid.'/edit');
    }
  }
}

I commented out in turn the drupal_goto line, then the if(($nid... statement, then the first if($_GET['q']... statement, and it is the $_get['q'] that I think is causing the problem. As stated before this problem only occurs on the home page where there is nothing after the domain name. Appending /?q after the domain name makes the homepage appear. Any ideas?

sun’s picture

Status: Active » Closed (works as designed)

Yes, Bio is not compatible with Aggressive caching.