Error message:
Fatal error: Call to undefined function content_field_instance_update() in /data/www/svn_driverpacks.net/profiles/basic/modules/insert/insert.install on line 36

It seems content.crud.inc is not yet included? Not sure how that is supposed to work, but that missing function is defined in that file.

Comments

quicksketch’s picture

Status: Active » Fixed
StatusFileSize
new898 bytes

Hm 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.

dgurba’s picture

I 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 ...

wim leers’s picture

I've had that problem too, but with just filefield_insert. Not sure how I fixed it though. Seems like a CCK caching issue.

wim leers’s picture

Priority: Critical » Normal
Status: Fixed » Active

The 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 …

quicksketch’s picture

Status: Active » Fixed
StatusFileSize
new1.13 KB

Alright 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.

wim leers’s picture

I'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!

lambic’s picture

I 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.

quicksketch’s picture

You don't need to use the patch, just try out the beta2 version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.