Today I discovered a bug that affects all galleries upgraded from a version earlier than 2.4.3. You are affected if all of the following are true:
- You have PDF files in your gallery.
- You originally installed GSP before version 2.4.3 and then upgraded to one of the later versions.
- Your site is running in Full Trust.
- You installed the Gallery Server Pro Binary Pack.
In short, this is a bug in the SQL upgrade script that shipped in 2.4.3 and later. Fortunately, there is an easy fix.
First, some background: In a default installation GSP creates a generic thumbnail image for PDF files, like this:
When you install the Gallery Server Pro Binary Pack, GSP uses the ImageMagick and GhostScript utilities to generate a thumbnail image that is an actual preview of the PDF file:
Today I discovered a bug, introduced in 2.4.3, where PDF files *always* get the generic thumbnail image, even when the binary pack is installed. The cause of this is a typo in the SQL upgrade script for 2.4.3:
UPDATE [gs_GallerySetting]
SET [SettingValue] = 'pdf,.txt,.eps,.psd,.tif,.tiff'
WHERE [SettingName] = 'ImageMagickFileTypes';
See the typo? I missed the period in front of ‘pdf’. To fix your gallery, update the setting to include the period. You can use this SQL:
UPDATE [gs_GallerySetting]
SET [SettingValue] = '.pdf,.txt,.eps,.psd,.tif,.tiff'
WHERE [SettingName] = 'ImageMagickFileTypes';
Since these settings are cached, recycle the IIS application pool to force the gallery to get a fresh copy from the database.
The next version of GSP will include a fix for this.