I think I've separated out the AcidFree issues ( http://drupal.org/node/251659 ) from the image module, and the following seem to be solely related to image.
1. On the image nodes, there is no link to the _original image. I see the preview, but it is not clickable.
2. For some image nodes, image module wants to re-generate derivative images. But when it does this, I see that the _preview file gets deleted from files/images directory, and instead a file with .1.jpg gets created. And then the image node displays nothing - no image, just the text.
3. When I create content, and fill in the image file name, clicking on "Preview" reports an error "You must upload an image". But I did provide an image file name, and if I look in files/images/temp, I see the uploaded file!
4. Using the devel module, I see some image nodes with the following info:
Array
(
[_original] => files/images/309_large.jpg
[preview] => files/images/309_large.preview.jpg
[thumbnail] => files/images/309_large.thumbnail.jpg
[0] => files/images/309_large.jpg
[1] => files/images/309_large.jpg
)
but after regeneration, things look like:
Array
(
[_original] => files/images/167_large.jpg
[1] => files/images/167_large.1.jpg
[0] => files/images/167_large.jpg
)
This does not seem right - shouldn't this array be indexed with names (like _original, thumbnail, preview) instead of numbers? In the database table "files", I see some "filename" columns with 1, while most seem to have the names and not numbers (_original, ...)
Two years now have struggled to move off 4.7, every time I do a dry-run of an upgrade, run into a load of issues dealing with images :-(
Any pointers or things to try appreciated.
Comments
Comment #1
bwooster47 commentedAt least one of the problems may be in function _image_get_sizes:
around line 995, I commented the line below, and replaced with the next line - then at least some things started working correctly, and the 0, 1, sizes[] values were no longer present - which seems like a step in the right direction!
// $sizes[$key] = $val; // XXX this is wrong????
$sizes[$val['label']] = $val; // this is what it should be?
But still struggling with numerous "Internal Server Errors", probably excessive CPU usage on re-building derivatives, and image nodes not displaying clicks to original image on the preview image, can't create new image node without the "you must upload an image" error.
Comment #2
Hetta commented1) is not an issue, it's an option:
Admin -> site config -> image -> Label: "original" ; Link: "Same Window" -> [save configuration]. Ditto for derivative sizes (preview, thumbnail, whatever). Piece of cake.
2) this is an OLDE bug, fixed in later versions. You might wish to give 5.x-2.whatever a try.
3) the preview -> no image node bug is found in loads of other issues, too; check the issue queue for those. (one often suggested workaround: don't preview your uploads ...)
4) I think that a jump from such an early version _requires_ some hands-on loving. If it were me, I'd check where image 4.7 puts its stuff, compare that to current image (5.x-2.x-dev, for preference - if you're jumping _anyway_, jump high ...), and write my own php script to get things where they should be ... that'd avoid various often-mentioned image upgrade problems. YMMV.
Comment #3
bwooster47 commentedThanks, I guess I'll try an older version of image first.
But to clarify, and one new question:
1) I don't see anything labeled "original" in the admin box for image.
I can manually add "original" (or should that be _original), but then it asks for a number in one of the size boxes, so I entered 5000, but this seems like it should be unnecessary...
This also triggers all rebuilding of thumbnails and previews even though those did not change, but maybe that is another of the bug due to the jump from 4.7 to 5.7
2) Since I don't expect image module to work for a while at my site, can someone answer how edits to existing image nodes are handled? For example, when I click on edit on an existing image node, does it require me to re-upload the picture? [That is what it does now, but it may be another issue special to my upgrade from 4.7 to 5.7]. I would like to be able to edit the title, description, etc of an image node without needing to reupload the picture.
Comment #4
Hetta commentedThe image shouldn't get rebuilt derivatives just because you edit the node.
Comment #5
bwooster47 commentedCurrent report.
I left out AcidFree for now, just testing new install of image module.
Starting with Drupal 5.7 (upgraded successfully from Drupal 4.7 - no image module used yet).
Using this base db many times, I tried every image module release
2.0 alpha1
1.8
1.6
1.4
All the above do not allow me to create content - always error out with "You must upload an image", even though this issue has been supposedly fixed.
image 1.2 works fine. It allows me to create the image node successfully.
that is such an old release, missing so many fixes, so I'll continue to monitor the new image module releases to see if creating image nodes starts working.
Comment #6
bwooster47 commentedWell, after staring at the code in image.install and image.module, I found the fix for the key problems.
Looks like my database had an old image_sizes variable in the variable table.
This was the root cause of all the problems. I used phpMyAdmin to delete all image_* variables, and then re-installed image 1.8.
And I can now add images (do have a problem that the image I added manually does not make a clickable preview image... but I'll look into that later).
And more importantly, the acidfree update now succeeded (after making a fix to acidfree.install as mentioned in the linked issue description).
So, far far better place now than a few days ago. Marking this issue as fixed. Would have been nicer if image.install could blow away these problem variables, but I don't have enough knowledge to submit a patch, it would definitely save some new users a lot of trouble.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.