I had a user report this error during an update:
An error occurred. http://localhost:8082/acquia-drupal/update.php?id=316&op=do <br /> <b>Fatal error</b>: Call to undefined function nodequeue_add_action() in <b>C:\Users\David\Sites\acquia-drupal-site\acquia-drupal\sites\all\modules\rules\rules\modules\rules.rules.inc</b> on line <b>352</b><br />
You can read through the whole issue, but essentially what happened is that the user has a rule setup to fire a nodequeue action on content update. My module's upgrade ended up calling a bunch of node_save()'s, and triggered the rule.
The function isn't found, because nodequeue.actions.inc is loaded via hook_init(). However, module_invoke_all('init') isn't called when running in maintenance mode or from update.php.
Ironically, I've also pulled my module's actions out into their own file, but I include it from the global scope of mymodule.module, just under the define() statements. If nodequeue were to do the same, this error wouldn't happen.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 985750-nodequeue.actions.inc_not_included_when_in_maintenance_mode_or_during_update-D6.patch | 14.55 KB | amateescu |
Comments
Comment #1
amateescu commentedI decided to move the whole content of nodequeue.actions.inc to the main nodequeue.module file because loading another file for only 120 lines of code was not worth the hassle (the main reason is that we also have *_form and *_submit functions for each action).
Fixed in 6.x with the attached patch. A 7.x port is not required.