New galleries are not shown
pluess - May 24, 2008 - 18:24
| Project: | Flash gallery |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | pluess |
| Status: | needs review |
Description
For new galleries only the simplwviewer "Startscreen" is shown.
I'm adding new galleries with image import. After this the new gallery is visible at /fgallery. But if I click on it only the simplwviewer "Startscreen" is visible. No pictures are displayed.
Going to the Flash Galleries admin page and enabling build thumbnail library solves the problem. But this is inconvenient and takes very long because it's recalculating everything for every gallery.

#1
There's another problem. Once the images are deleted, the preview images in flash/thumbs directory are not deleted.
#2
The first problem occurs, because flash_gallery_nodeapi is never called with a valid preview image if the images are imported with the image import module. The problem can be solved by implementing hook_image_alter of the image module.
The second problem happens because flash_gallery_nodeapi tries to access the original image file, which has already been deleted by image_delete. The check has been softened to just check whether the file to delete really exists.
The attached patch contains fixes for both problems.