I had an old installation of imagefield where filefield was not previously installed (it was either never installed or disabled by the time of the update) - since fieldfield was not previously required for imagefield to work. I ran into an error message during the update when something tried to run hook_elements() on imagefield, which then tried to use a filefield function that didn't exist.
I got around the error with the following patch, which should cause no problems in normal situations, since filefield is now required.
After the update I also ended up with filefield shown as not installed with the checkbox disabled on the modules page. I had to disable imagefield, enable filefield, reenable imagefield, and then re-run update.php to get the update to complete properly. So you might want to note that somewhere for anyone else that didn't have filefield enabled in the earlier version.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | imagefield_disable.patch | 963 bytes | quicksketch |
| imagefield.patch | 785 bytes | karens |
Comments
Comment #1
avpadernoComment #2
quicksketchThanks KarenS. I'm nervous about all the potential API calls ImageField makes to FileField (there are lots of them). Perhaps a safer approach would be to simply disable ImageField entirely until FileField is installed? It also solves the problem of needing to disable ImageField manually then enable FileField and ImageField both on the modules page.
Comment #3
quicksketchComment #4
quicksketchCommitted, please let me know if it's causing any unexpected problems.
Comment #5
karens commentedI think you may still need my fix, too, because the update.php code will try to update the module even if it is disabled and it will hit imagefield before filefield, so they will update in the wrong order. I haven't tested that yet -- I need to find my old db and try another update to be sure, but I'm pretty sure of that.
Comment #6
karens commentedOops, commented on wrong issue, please ignore :)