Hi
Unable to uninstall, get this:
Call to undefined function media_variable_default() in /drupal/sites/all/modules/media/media.install on line 104
Is this function deprecated or not yet added to the code?
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | media-7.x-1.x-1169472-uninstall_need_module_load.patch | 471 bytes | hswong3i |
| #17 | 1169472_fix.patch | 400 bytes | steinmb |
| #11 | media-uninstall-1169472.patch | 451 bytes | mrf |
| #3 | undefined-function-1169472-3.patch | 334 bytes | mohan1411 |
Comments
Comment #1
Mindexperiment commentedsame error..
Comment #2
milesw commentedme too
Comment #3
mohan1411 commentedEven I got this error when I try to uninstall media module. I got this fixed by including "media.variables.inc" file in the media.install.
require_once ( dirname(__FILE__) . '/includes/media.variables.inc');
Comment #5
mohan1411 commented#3: undefined-function-1169472-3.patch queued for re-testing.
Comment #7
steinmb commentedTo me this is only a work around and do not address the real problem. The file (includes/media.variables.inc) containing this function is already included by media.module, and should not need to be included one more time.
Comment #8
dilari commentedAlthough the #3 patch may not be a real solution it does help uninstalling the module..
Comment #9
elgandoz commentedsubbing
Comment #10
carwin commentedsubscribe
Comment #11
mrf commentedYou can't call functions defined in a disabled module.
Instead of adding the missing function definitions I looked at what media_variable_default and media_variable_del were doing and came up with the following which accomplishes the same result in a less elegant way.
Comment #13
mrf commentedMy patch was against the latest dev...
Comment #14
mrf commented#11: media-uninstall-1169472.patch queued for re-testing.
Comment #16
fedik commentedI add next code in to up of the media.install file, and it work for me
Comment #17
steinmb commentedLike correctly stated in #11, the issue is, that when a module is disabled, hook_uninstall does not load the .module —file and non of the inc files get included. This patch is a onliner-fix that follow recommendations from this core issue #1029606: Regression: Not loading the .module file causes a fatal error when uninstalling some modules (as does loading it).
Comment #18
mrf commented+1 to #17 better to load in everything for future compatability
Comment #19
brianV commented+1 for this patch as well. I would like to see it committed ASAP, as you can't uninstall the current -dev branch without it.
Comment #20
hswong3i commentedsubscribe
Comment #21
hswong3i commentedPatch via media-7.x-1.x GIT, tested with drupal-7.4 and uninstall successfully without WSOD.
Comment #22
fasdalf@fasdalf.ru commented#17 and #21 work both. Thank you.
Comment #23
devin carlson commentedI tried patch in #21 and it worked for me.
Comment #24
likewhoa commented#21 worked here too
Comment #25
aaron commentedawesome! got that committed to both the 7.x-2.x and 7.x-1.x branches. thanks, everyone!