Closed (fixed)
Project:
Insert
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2009 at 13:00 UTC
Updated:
6 Nov 2009 at 16:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchHm strange. It looks like it might be available some of the time (such as if the caches are empty). But I think you're right, we should be pulling in that include directly. Committed the attached patch.
Comment #2
dgurba commentedI did a CVS checkout of your project with the applied patch just a few minutes ago. I saw that "filefield_insert_settings" was in my Devel Variable Editor -- but upon upgrade to Insert I got:
"Invalid foreach called in insert.install line 24"
It said that the upgrade occurred, and deactivated filefield_insert module -- but my "file insert" widgets have not been updated to reflect the widget depicted on: http://drupal.org/node/610286
I will look at the code more later ....
EDIT: I did do a Devel "Flush all caches" after I installed and ran update.php ...
Comment #3
wim leersI've had that problem too, but with just filefield_insert. Not sure how I fixed it though. Seems like a CCK caching issue.
Comment #4
wim leersThe upgrade path now works in that it does not break the site with a PHP error. But the upgrade process still fails for me.
1) FileField Insert didn't get disabled, although the message claims so.
2) At least the "insert width" setting didn't get transferred.
No big deal for me, may be for others. Just warning you …
Comment #5
quicksketchAlright looks like I introduced a new bug in my last "fix". The && operator takes precedence over the = operator, meaning that we were essentially setting $filefield_insert_settings = 1, which would cause the foreach() error. This version wraps in parentheses and correctly disables FileField Insert by using module_disable() instead of drupal_uninstall_module(). Since FileField Insert didn't have an uninstall hook, there's not much difference in just disabling it instead of uninstalling.
Thanks again Wim for your testing, please let me know if it's still broken.
Comment #6
wim leersI'm afraid I can't test again — but I'm sure it's all working well now :) Thanks for your prompt responses to this issue and the other!
Comment #7
lambic commentedI get this error when I use drush (drush enable insert), but it works ok enabling from within drupal (using version 6.x-1.0-beta1 unpatched).
I'll try it with the patch when I have a sec.
Comment #8
quicksketchYou don't need to use the patch, just try out the beta2 version.