Getting this error message while running database update any idea....

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://www.example.com/update.php?op=selection&token=ASBOXKediy39xCOmBqJ... StatusText: OK ResponseText: Fatal error: Call to undefined function panels_load_displays() in /sites/all/modules/panels/panels.install on line 456

CommentFileSizeAuthor
#2 2206925-2-load_panels_on_update.patch574 bytesadammalone
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mfby2k’s picture

Issue summary: View changes
adammalone’s picture

Status: Active » Needs review
FileSize
574 bytes

This is caused by a specific set of circumstances. I was able to replicate with the following:

  • Install Panels <= 7.x-3.1
  • Disable the module but do not uninstall
  • Download Panels >= 7.x-3.4
  • Run update.php

The reason for this is that Drupal will not load .module files of disable modules. It can be remedied with the patch I am attaching.

matt.rad’s picture

Had the same issue, but resolved it by enabling panels and then running the database update.

mfby2k’s picture

Thanks typhonius for the patch but the error is fixed by using matt.rad method #3.

dpfitzsi’s picture

This breaks upgrades from Drupal 6 where all contrib modules have been disabled to run update.php as per Drupal's upgrading instructions. Yes, enables panels is a workaround, but it should be possible to run core updates when all contrib modules are disabled. Correct?

+1 for the patch

dpfitzsi’s picture

After testing this patch you will now get this error when upgrading a site:

Error: Call to undefined function ctools_include() because ctools is required by panels.module.

adammalone’s picture

@dpfitzsi, thanks for testing this. How about we also load the ctools module. I'm am however wary of making assumptions that the Drupal install has ctools present.

dpfitzsi’s picture

@typhonius I've tried the ctools line during upgrading a site (from Drupal 6), and the patch would still fail for this case. I had to link back to 3.3 to make upgrades work.

ajayg’s picture

Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

Marking this critical as this fails any upgrade from 6.x. Enabling panels did not work as was getting a different error. But the patch above worked
Without the patch I was going in a loop. Could not upgrade other modules when panel is disabled and could not upgrade panel module.

pbirk’s picture

I used the patch in #2 for an upgrade from 6.x. I'm using drush, and it indicated the patch ran successfully but also dumped quite a few warnings:

Invalid argument supplied for foreach() export.inc:818 [warning]
Invalid argument supplied for foreach() export.inc:818 [warning]
...repeated many times...
Invalid argument supplied for foreach() panels.module:904 [warning]
Invalid argument supplied for foreach() plugins.inc:100 [warning]
...repeated many times...
Performed update: panels_update_7302 [ok]

I couldn't identify any major problems after applying the upgrade like this, but the warnings still bothered me because I am scripting an upgrade for a site that uses Panels pretty extensively. So, I found that this approach runs the upgrades without errors (or patches):

Disable all modules and upgrade to 7.x as usual
Download ctools 7.x and run drush updb, then drush cc all
Enable ctools
Download Panels 7.x-3.3 and run drush updb, then drush cc all
Enable panels
Download Panels 7.x-3.4 and run drush updb, then drush cc all

I haven't tried testing without clearing the cache so much - it's entirely possible that step is overkill. I haven't noted any problems yet, but I still have a lot of work left on this upgrade so I'll update this if I run across anything.

japerry’s picture

This is a good check to do. It may not fix all of the upgrade issues, but it should fix at least this one. Committed.

japerry’s picture

Priority: Critical » Minor
Status: Reviewed & tested by the community » Fixed

  • japerry committed 20be0df on 7.x-3.x authored by typhonius
    Issue #2206925 by typhonius: error message after panels recent update
    

Status: Fixed » Closed (fixed)

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