Downloaded the alpha 3 version, ran update.php, received the following errors:

  • user warning: Can't DROP 'field_image_alt'; check that column/key exists query: ALTER TABLE content_field_image DROP COLUMN field_image_alt in sites/all/modules/imagefield/imagefield.install on line 242.
  • user warning: Can't DROP 'field_image_title'; check that column/key exists query: ALTER TABLE content_field_image DROP COLUMN field_image_title in sites/all/modules/imagefield/imagefield.install on line 243.

Looked at those tables, and sure enough those columns don't even exist.

CommentFileSizeAuthor
#7 imagefield_install_1.patch624 bytesq0rban
#4 imagefield_install.patch577 bytesq0rban
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

q0rban’s picture

Title: Imagefield alpha 2 to alpha 3 upgrade path broken. » Imagefield alpha 2 to alpha 3 upgrade errors

Change title.

clemens.tolboom’s picture

Same error here from alpha1 to alpha3

webernet’s picture

Please remember that this module is still only in the Alpha stage (for testing purposes only), and is not ready for production use by anyone who is unprepared to encounter, and help fix, bugs.

Upgrades from Alpha (or sometimes even Beta) releases are unsupported and users are responsible for fixing any issues with their own sites if they are using these releases.

The errors are not harmful. The columns are being dropped for sites upgrading from Drupal 5. They could be avoided by adding some checks to ensure that the columns exist prior to attempting to drop them. If someone feels strongly about it, I'm sure they'll be able to come up with a patch and help get this module ready for a stable release.

q0rban’s picture

FileSize
577 bytes

@webernet, didn't mean to imply that there shouldn't be bugs in this version. Just thought I'd post what I found in case it was helpful. Untested patch attached.

q0rban’s picture

Priority: Normal » Minor
Status: Active » Needs review
drewish’s picture

Status: Needs review » Needs work

i think that it might be better to do it using drupal's database functions:

if (db_column_exists($table, $col_*)) then { 
  db_drop_field($ret, $table, $col_*);
} 
q0rban’s picture

FileSize
624 bytes

Have the time to write it, but not the time to test it... ;)

drewish’s picture

Status: Needs work » Needs review

looks pretty good but i'm on the wrong box to test it.

drewish’s picture

drewish’s picture

Status: Needs review » Fixed

thanks, committed to head.

Status: Fixed » Closed (fixed)

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