16 September 2010 at 12:50am
When i hover over an image in my gallery I get a little trashcan 'Delete' icon which allows me to delete the image from the gallery successfully.
However, if I click on the image, a popup window appears where I can rotate the image, edit the caption, change the album and finally 'Replace' or 'Delete the image. If i click 'Delete' from here, once the popup window closes i am left with the broken image icon. I see that this is because the record is not being deleted from the 'ImageGalleryItem' table whereas using the first method (deleting via the trashcan icon), it does delete the record.
Has anyone else had this problem? I'm more than happy to just remove the 'delete image' button from the popup if it's an easy solution.
Two different things.. from the table view, you're deleting the entire item... it's caption, description, album id, etc, but from within the popup you're removing just the image that is attached to that record.
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com
16 September 2010 at 2:05am
Ah that makes sense. Thanks for your reply. Though if that is the case then I may have spotted a minor bug. If you delete the image through the popup and return to the gallery, the image now displays the broken image icon. However, you can't delete this now using the trashcan icon - it doesn't do anything. So basically an image needs to be there in order to delete it using the icon.