Posted by paradiso on January 12, 2008 at 7:48pm
Jump to:
| Project: | Image |
| Version: | 5.x-2.x-dev |
| Component: | image.module |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I'm trying to upgrade a website from Drupal 4.7.10 to 5.6, consisting of about 2000 image nodes and 1000 regular nodes. Here's the error message after running the image upgrade script:
* The selected file could not be copied, because no file by that name exists. Please check that you supplied the correct filename.
* user warning: Unknown column 'image_size' in 'field list' query: INSERT INTO image (nid, image_size, fid) VALUES (109, '_original', 5817) in /var/alternc/html/p/paradiso/patwhite/includes/database.mysql.inc on line 172.
* Lots of gibberish similar to previous line
* user warning: Table 'image' already exists query: CREATE TABLE image ( `nid` INTEGER UNSIGNED NOT NULL, `fid` INTEGER UNSIGNED NOT NULL, `image_size` VARCHAR(32) NOT NULL, PRIMARY KEY (`nid`, `image_size`), INDEX image_fid(`fid`) ) /*!40100 DEFAULT CHARACTER SET utf8 */; in /var/alternc/html/p/paradiso/patwhite/includes/database.mysql.inc on line 172.
* user warning: Column count doesn't match value count at row 1 query: INSERT INTO image SELECT DISTINCT f.nid, f.fid, f.filename FROM files f INNER JOIN node n ON f.nid = n.nid WHERE n.type='image' AND f.filename IN ('_original', 'thumbnail', 'preview') in /var/alternc/html/p/paradiso/patwhite/includes/database.mysql.inc on line 172.
* user warning: Unknown column 'image.fid' in 'where clause' query: DELETE FROM file_revisions WHERE EXISTS (SELECT * FROM image WHERE image.fid = file_revisions.fid) in /var/alternc/html/p/paradiso/patwhite/includes/database.mysql.inc on line 172.Trying to view an image node displays the "body" text correctly, except that there is no image and the following error message:
user warning: Unknown column 'i.image_size' in 'field list' query: SELECT i.image_size, f.filepath FROM image i INNER JOIN files f ON i.fid = f.fid WHERE i.nid = 3324 in /var/alternc/html/p/paradiso/patwhite/includes/database.mysql.inc on line 172.An attempt to restore the 4.7 database and run the upgrade scripts again produced exactly the same results. What can I do?
Comments
#1
Oh, by the way I just noticed that other Drupal 4.7 websites do not have an 'image' table at all, even though that module is enabled...
So I guess the already existing 'image' table that causes all these problems is a remnant of Drupal 4.2 or something? Suppressing it doesn't harm the newly restored 4.7.10 website... So I'll make a 3rd upgrade attempt and keep you informed.
#2
The problem was solved by manually deleting the faulty 'image' table in the 4.7 database, before running update.php.