Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#2 | 2206925-2-load_panels_on_update.patch | 574 bytes | adammalone |
Comments
Comment #1
mfby2k CreditAttribution: mfby2k commentedComment #2
adammaloneThis is caused by a specific set of circumstances. I was able to replicate with the following:
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.
Comment #3
matt.rad CreditAttribution: matt.rad commentedHad the same issue, but resolved it by enabling panels and then running the database update.
Comment #4
mfby2k CreditAttribution: mfby2k commentedThanks typhonius for the patch but the error is fixed by using matt.rad method #3.
Comment #5
dpfitzsi CreditAttribution: dpfitzsi commentedThis 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
Comment #6
dpfitzsi CreditAttribution: dpfitzsi commentedAfter 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.
Comment #7
adammalone@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.
Comment #8
dpfitzsi CreditAttribution: dpfitzsi commented@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.
Comment #9
ajayg CreditAttribution: ajayg commentedMarking 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.
Comment #10
pbirk CreditAttribution: pbirk commentedI 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.
Comment #11
japerryThis is a good check to do. It may not fix all of the upgrade issues, but it should fix at least this one. Committed.
Comment #12
japerry