Download & Extend

Update module calling un-loaded functions - causing errors

Project:Drupal core
Version:7.x-dev
Component:update.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Drupal 7.9 - OpenPublish 7.x-1.0.2
nginx Barracuda/1.0.10
PHP 5.2.17
Aegir

I was running into issues with the OpenPublish apps installer which uses the update module. My use case and errors are listed in this issue: Installing Disqus "app" - AJAX HTTP error

However, once I hacked OpenPublish to work, I realized there were other errors occurring in the update.manager.inc. Some functions in update.manager.inc were calling _update_manager_XXX helper functions that weren't available but live in the update.module file. In particular the update_manager_file_get() function calls _update_manager_cache_directory() but that helper function isn't loaded from upload.module.

I will attach a patch that is my attempt to move these helper functions to the upload.manager.inc and adjusts the upload.module to load them only when necessary. Hopefully this makes sense.

Comments

#1

Attached is a patch to update.module and update.manager.module to resolve error of calling unloaded functions.

AttachmentSizeStatusTest resultOperations
update_helper_functions-1359550-1.patch4.45 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch update_helper_functions-1359550-1.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

#2

Title:Upload module calling un-loaded functions - causing errors» Update module calling un-loaded functions - causing errors

fixed typo in title

#3

I'm experiencing this same issue on Drupal 7.10

#4

Version:7.9» 7.x-dev
Status:needs work» needs review

I double checked my earlier patch and I accidentally had it reversed. I re-rolled it onto the latest 7.x-dev. Please review.

@artis, can you test/review the patch?

AttachmentSizeStatusTest resultOperations
update_helper_functions-1359550-4.patch4.51 KBIdlePASSED: [[SimpleTest]]: [MySQL] 37,840 pass(es).View details | Re-test
nobody click here