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.
Images are not displayed after 4.4 to 4.5 upgrade. The errors occur because the database field image.image_list was empty after upgrade. The following dirty hack solved the problem temporarily:
-
// Hack for the case image_list IS NULL and the correct path is not added to "
if($fname=="") $fname = $node->image_path;
Is it a problem in update-image.php (I am using a postgresql database) or a general problem in the module, which do not handle older images / older records in the image table? Anyone an idea?
Comment | File | Size | Author |
---|---|---|---|
#4 | image_module_4.4to4.5_update_script_pgsql.patch | 464 bytes | hystrix |
Comments
Comment #1
aam CreditAttribution: aam commentedI forgotten to show the position of the hacked code fragment... It's on the end of the image_node_content function:
Comment #2
aam CreditAttribution: aam commentedAfter download of current versions of drupal 4.5.0 and the image module, this problem does not occur anymore....
Comment #3
(not verified) CreditAttribution: commentedComment #4
hystrix CreditAttribution: hystrix commentedThe problem was with the update script's included sql for postgres. As discussed in Issue 11057.
The update-image.php script would fail with the following error:
Not having the table change applied would result in the following error when viewing an image:
Patch against 4.5.0 attached. After patching, you should be able to run the update script. After altering my table by hand, the viewing error went away.
According to the patch handbook, I should not switch the status of this issue to "patch":
As the 4.6.0 version of the image module is a complete re-write, it no longer includes the same upgrade script. It is not clear to me why modules don't have their own patch level version numbers so that modules running on older versions of drupal can be maintained. It doesn't make sense for someone running 4.5.2 on postgres to have to hit this snag if the fix is known. But I understand it becomes difficult to support older versions.