An unrecoverable error while updating

pareen - September 2, 2009 - 08:51
Project:ImageField
Version:6.x-3.1
Component:Miscellaneous
Category:support request
Priority:critical
Assigned:Unassigned
Status:needs review
Description

I run D6. I updated imagefield to the latest version 3.1

I followed the correct update procedure.

I also updated the following modules with it:
link (2.6)
image (1.0 alpha6)
imageapi (1.6)
cck (2.5)
filefield (3.1)

After running update.php I got only one error (from imagefield) which looks like this:
An unrecoverable error has occurred. You can find the error message below. It is advised to copy it to the clipboard for reference.
Please continue to the error page
An error occurred. .../update.php?id=6&op=do
Fatal error: Call to undefined function content_field_tablename() in .../sites/default/modules/imagefield/imagefield.install on line 66

I don't know what to do. Please guide me. I don't want my site to be in maintenance mode for long.

Thanks

#1

quicksketch - October 20, 2009 - 19:51

It sounds like you're upgrading from Drupal 5 or a very old version of ImageField. You need to upgrade CCK first, make sure it's enabled, then run the imagefield updates.

#2

DamienMcKenna - November 4, 2009 - 02:36

There's a related issue I'm running into..

An error occurred. http://mysite/update.php?id=7&op=do <br /> <b>Fatal error</b>: Call to undefined function content_clear_type_cache() in <b>/mysite/sites/all/modules/contrib/imagefield/imagefield.install</b> on line <b>86</b><br />

ImageField should block itself from being updated if it is not enabled, as other CCK fields do.

#3

DamienMcKenna - November 4, 2009 - 02:43

Another idea related to the bug I found - if the CCK module is not enabled then imagefield_update_6004() fails with the error above. Adding the following line to the top of the function resolves the issue:

<?php
  module_load_include
('module', 'content');
?>

#4

DamienMcKenna - November 4, 2009 - 02:52
Status:active» needs review

Here's a quick patch that makes sure CCK is enabled before running update_6003() and loads content.module for update_6004().

AttachmentSize
imagefield-n566038.patch 1.22 KB
 
 

Drupal is a registered trademark of Dries Buytaert.