Josh Larios
-
9/18/2009 11:57:01 PM
Saving an updated file instead of/before checking it in discards the changes
Summary: When editing a previously uploaded file by uploading a new version, clicking on "Save" instead of "Check in" will save the new file's metadata, but not its content.
Relevant (as far as I can tell) configuration details:
Version: 4.1 Build: 4.1.3541
Global settings, category "Files" Store files in file system: True Store files in database: True Generate thumbnails: True Redirect files to disk: True Check if files are published: True Check files permissions: True
Global settings, category "Content management" Use automatic version numbering: True Use check in/check out: True Version history length: 20
Steps to reproduce:
1. Create a new document of type "File". 2. Upload a small image file. 3. Save the document. 4. Check the document in. 5. Publish the document. 6. Verify that the image is available on the live site at the desired URL. 7. Check the document out. 8. On the "Form" tab, click on the "Update" icon to upload a different file. 9. Select a different image and accept the choice. 10. Hover over the new file name to verify that the new image has been uploaded. 11. Save the document (click on "Save" under the "Form" tab). 12. Hover over the file name. For me, at least, it has now reverted to the original image. 13. Check the Preview. It's the original image. 14. Check in and Publish the document. 15. Verify that the image at the public URL is the original, not the new image.
Expected outcome: the document is updated to contain the second image.
Actual outcome: the document's metadata (file name, file size, dimensions) reflect the second image, but the binary data is that of the first.
If, in step 11, you check the document in rather than saving it, the outcome is as expected, with the second image replacing the first. It's just if you click "Save" at this point that it goes off the rails. It appears to be reproducible with files of other types, not just images. I haven't reproduced it with other document types, just CMS.File.
|