Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comparing an imagefield created in 6.x with a 5.x update, the following are not being updated properly:
content_node_field_instance -- widget_type, widget_module, widget_active
Even after correcting those fields, images still aren't appearing.
Comment | File | Size | Author |
---|---|---|---|
#4 | imagefield-5.x-2.1.sql_.txt | 1.61 KB | Matthew Davidson |
#4 | imagefield-6.x-3.0-alpha1.sql_.txt | 2.03 KB | Matthew Davidson |
Comments
Comment #1
dopry CreditAttribution: dopry commentedhow are they not being updates properly? Do you have an example table you can dump for testing... content_node_field and content_node_instance before and after update?
Comment #2
webernet CreditAttribution: webernet commentedThe following changes are not made (still needed):
content_node_field_instance:
widget_type: "image" --> "imagefield_widget"
widget_module: "" --> "imagefield"
widget_active: "0" --> "1"
content_node_field
db_columns: shouldn't be empty?
Comment #3
webernet CreditAttribution: webernet commentedComment #4
Matthew Davidson CreditAttribution: Matthew Davidson commentedHere are the two tables before and after for a (fortunately) very simple site I've just upgraded from Drupal 5.9/Imagefield 5.x-2.1 to Drupal 6.4/Imagefield 6.x-3.0-alpha1.
Comment #5
Matthew Davidson CreditAttribution: Matthew Davidson commentedHere's a workaround that kinda works. Sorry I can't provide a patch, but I'm not at all familiar with how .install files work, and that's where the problem is bound to be.
I'm finding that on old nodes, image thumbnails are not being displayed on the edit form, but this may be an unrelated issue, and I can live with that. New uploaded images are fine.
Comment #6
grendzy CreditAttribution: grendzy commentedI had this issue too. Matthew's post #5 did work, although it took a few tries to get right (once, the database column content_type_TYPENAME.field_FIELDNAME_fid got dropped from the database).
Comment #7
seaneffel CreditAttribution: seaneffel commentedMatt on #5 was spot on. I created a dummy imagefield field, copied the db_columns value from the dummy to my original imagefield in the {content_node_field} table, hand entered the values in the {content_node_field_instance} table, and then cleared my cache with Devel. All the images reappeared magically.
Thanks for posting this workaround.
Comment #8
webernet CreditAttribution: webernet commentedLet's move over to #296195: Imagefield widget upgrades aren't working
Comment #9
aaronpinero CreditAttribution: aaronpinero commentedI had a similar issue with imagefield after updating from D5 to D6. After reading the solution provided by Matthew, I checked out the content_node_field table in the db and the db_columns field for the row that corresponds to my image field was empty. In the process of preparing to follow his protocol, I unintentionally re-saved the field's configuration settings under "Manage fields" in the associated content type. Doing so repopulated the db_columns field for the imagefield and my images once again appeared on the website. So I did the same thing for my other imagefields (simply clicking on the configure option under "Manage fields" and saving the configuration without making any changes) and all my images returned.
This error has been deviling me all day so thanks to Matthew et al for digging into this. I was wearing out Google trying to find a solution for this problem.