Drupal version 5.15
CCK version 5.x-1.10
Files directory permissions 755
Temp directory permissions 755
Download method public
Expect no errors and probably no database changes for this update
Running update script when updating from Imagefield 5.x-2.2 to 5.x-2.3 reports following:
Fatal error: Call to undefined function _content_admin_display_contexts() in /var/www/html/sites/all/modules/imagefield/imagefield.install on line 81
Update status reports correct module installed. I did a complete re-download, delete module folder, upload and update with exact same result.

CommentFileSizeAuthor
#5 imagefield.install.patch578 bytesclaudiu.cristea

Comments

iancawthorne’s picture

I followed the same steps above and also get the same problem.

zooney’s picture

I also get the same problem.

bobdalob’s picture

Me too.

buzzdecafe’s picture

I also have the same problem. Here's some background:

CCK 5.x-1.10 contains this function in content_admin.inc:

449  function _content_admin_display_contexts() {
450    return array(
451      'teaser' => t('Teaser'),
452      'full' => t('Full'),
453    );
454  }

So changing line 81 in imagefield.install: foreach (_content_admin_display_contexts() as $context) {
to: foreach (array('teaser' => t('Teaser'), 'full' => t('Full')) as $context) {

and running the update works flawlessly. So the question is, why isn't the CCK function getting called?

claudiu.cristea’s picture

StatusFileSize
new578 bytes

Here's the patch

threexk’s picture

Patch works for me.

threexk’s picture

Status: Active » Needs review
jackalope’s picture

Had the same problem, patch worked for me. Thanks!

drewish’s picture

Status: Needs review » Fixed

thanks, committed to HEAD and DRUPAL-5--2

drewish’s picture

wylbur’s picture

Status: Fixed » Active

Uploaded version 5x-2.3 and still get the same error. Has this been committed to the production version of the module, or do we have to install the patch? Do I have to uninstall and reinstall? Will there be a new version of the module?

jantoine’s picture

wylbur,

The patch has been committed to Head, meaning it is in the repository and will be available in the next dev release that the system auto-generates, but there has not been a release since the patch was applied. You don't need to uninstall and re-install. All you need to do is apply the patch and run the update.php script and you should be good to go.

Cheers,

Jon Antoine
dev.antoinesolutions.com
Open Source Development Tutorials & Documentation

jantoine’s picture

Status: Active » Fixed

Setting to fixed.

Cheers,

Jon Antoine
dev.antoinesolutions.com
Open Source Development Tutorials & Documentation

Status: Fixed » Closed (fixed)

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