Albums have no thumbnails

174 views
Skip to first unread message

whips...@gmail.com

unread,
May 14, 2020, 6:59:29 PM5/14/20
to gallery...@googlegroups.com

I got my G3 working!  I’ll post what I had to do separately.

 

http://sandbox.cheddarmongers.org/gallery3/

 

Here’s a fresh install of Gallery3, Version 3.1.0.  I imported my ~7,000 pics from my Gallery2 site.  Everything now appears to work right except that the albums don’t display thumbnails.  I even created a brand new album and uploaded some pics, and still no album thumbnail.

 

I don’t think it’s an image toolkit issue because thumbnails appear everywhere else – browsing within albums, in the random image block in the sidebar, etc.

 

Here’s what I tried to do to correct this:

Tried both imagemagick and gd toolkits, no change.

Changed the target size of the thumbnails from 200 to 150 in the theme options, it rebuilt the thumbnails, but they still don’t display.

I tried Wide Wind, Gallery Wind, and Clean Canvas themes, no change.

I tried maintenance/rebuild images and fix your gallery, no change. 

I made sure /var is 777 recursively.

 

Any ideas on what the issue could be?

 

 

Brad Dutton

unread,
May 14, 2020, 7:35:10 PM5/14/20
to Gallery 3 Users
Probably some issue with the g2 importer. Assuming the importer set a valid cover image for each album, you can flag only the album thumbnails to be recreated by running this SQL on your database:
update items set thumb_dirty = 1 where type = 'album' ;
Then run the maintenance job to actually recreate them

If that doesn't help go into one of the albums and choose the image to be the album cover, see if that makes a thumbnail for the album. At least then we'll know what the problem is.

whips...@gmail.com

unread,
May 14, 2020, 11:38:06 PM5/14/20
to gallery...@googlegroups.com

Didn’t help.

 

I ran this:

update g3_items set thumb_dirty = 1 where type = 'album' ;

mysql updated the 270 album rows, and I ran the maintenance job to create the images, no change.

 

I tried setting an image to be the album cover on several of the albums, and the page confirms that it was done, but it still doesn’t show up.

 

When I created a brand new album, it didn’t have an album thumbnail visible either.

 

I don’t see any .album.jpg files in the file system.  Should there be?

 

Here’s what one of the album rows in g3_items looks like:

 

id

=

1

album_cover_item_id

=

271

captured

=

NULL

created

=

1162469723

description

=

Photo gallery for registered users

height

=

NULL

left_ptr

=

1

level

=

1

mime_type

=

NULL

name

=

album

owner_id

=

4

parent_id

=

0

rand_key

=

NULL

relative_path_cache

=

relative_url_cache

=

resize_dirty

=

1

resize_height

=

NULL

resize_width

=

NULL

right_ptr

=

14332

slug

=

NULL

sort_column

=

title

sort_order

=

ASC

thumb_dirty

=

0

thumb_height

=

150

thumb_width

=

118

title

=

Picture Gallery

type

=

album

updated

=

1589467717

view_count

=

616638

weight

=

1

width

=

NULL

view_1

=

1

view_2

=

0

view_3

=

0

view_4

=

0

view_5

=

0

view_6

=

0

--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gallery-3-users/1ee9ccfb-6b9c-4daa-b53a-df8aab80ef00%40googlegroups.com.

Brad Dutton

unread,
May 15, 2020, 12:25:40 AM5/15/20
to Gallery 3 Users
Yes, the .album.jpg files should be in var/thumbs. You said you made everything 777 in var so that's a bit strange.

[bdutton@gallery var]$ pwd
/web/duttonbros.com/gallery/htdocs/gallery3/var
[bdutton@gallery var]$ find . -name .album.jpg | head -n 3
./thumbs/.album.jpg
./thumbs/test-rotate/.album.jpg
./thumbs/test-rotate/import-02/.album.jpg


Is there anything valuable in your log file?

[bdutton@gallery var]$ ls -l logs/*.php
-rw-r--r-- 1 apache apache  1624 May 14 16:30 logs/2020-05-14.log.php

To unsubscribe from this group and stop receiving emails from it, send an email to gallery...@googlegroups.com.

JR

unread,
May 15, 2020, 3:04:17 AM5/15/20
to gallery...@googlegroups.com

I am out of my tech depth on what this problem might be, but have thought of one more thing to try to help diagnose it (or maybe fix it):

You say when you go into an album that all the images in there have their proper thumbnails displaying. At the top right of each thumb image there should be a tiny settings "gear wheel" icon. Hover your mouse over it and an options menu should appear. Click on the "Choose as the Album Cover" option. When I do this I get a white screen that says:




result "success"
reload 1

I hit my browser back button to get back to where I was and when I go up one level and I see my album has a new cover thumbnail (the one I just selected).

It's worth a try to see what happens when you do this.

-- J.R.

--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gallery-3-users/014201d62a43%2451260570%24f3721050%24%40gmail.com.

whips...@gmail.com

unread,
May 15, 2020, 9:55:08 AM5/15/20
to gallery...@googlegroups.com

I found the thumbnails!  They were 604 so I reapplied the permissions to 777.

However, I’m on ver 3.1.0.  I’ll upgrade to 3.1.2 and go from there.

To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gallery-3-users/63c29d69-25c1-47d7-84d5-01ddcb091923%40googlegroups.com.

Cheddarmonger

unread,
May 20, 2020, 5:47:24 PM5/20/20
to Gallery 3 Users
After lots of experimentation, I figured it out.


I think that the FilesMatch directive in the Drupal .htaccess has something in it that denies access to files that start with a dot.  When I commented out the whole FilesMatch section in the Drupal .htaccess, the thumbnails were all good.

So -- do any of you know your way around .htaccess enough to help me figure out what I need to change?  Here's what I'm working with:

<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order allow,deny
  </IfModule>
</FilesMatch>


 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-users+unsubscribe@googlegroups.com.

Adrian London

unread,
Feb 25, 2024, 12:39:23 PM2/25/24
to Gallery 3 Users
I know I'm replying to an old message, but a few days ago I kind of accidentally upgraded my hosted environment from PHP 7 to PHP 8.3 and - well, things didn't work so well initially :)

I, like most people here I suspect, have a heavily customised install with changes mostly made around 10 years ago, so are not exactly easy to remember.  This means just slamming "3.1.5 revival" over my install would cause issues, so I went through errors one by one.  Plus, some of my theme changes just expect my hacked modules to (a) exist and (b) contain my edits/hacks.  There's no "if module X exists then do ..." stuff.  It simply dies :)

Anyway, one of the issues I had was no thumbnails on any albums, regardless of which theme I used.   I turned on the browser tools in Firefox and got very clear "permission denied" messages for all the ".album.jpg" files.  As these seem blocked by my hosting provider, and I couldn't easily find a way to allow access while still keeping the system secure (I don't want .htaccess to be readable, for example) I decided on another approach.

I changed all occurrences of the text ".album.jpg" to "album.jpg" in ...
  modules/gallery/models/item.php
  modules/gallery/helpers/item.php

(for vi experts, note there is one ".album\.jpg" which my global search and replace missed.)

Then I renamed all the ".album.jpg" files in var/thumbs.  
I have no ssh access to my hosted system, so downloaded the entire "thumbs" directory to my Mac, used a small script to rename as required, then deleted and re-uploaded the directory.  Another option would be to simply flag the thumbs as dirty in the database and recreate them, but that'd leave the dot-files behind and my obsessive/tidy personality wouldn't like that.

All good!
On Wednesday 20 May 2020 at 23:47:24 UTC+2 Cheddarmonger wrote:
After lots of experimentation, I figured it out.


I think that the FilesMatch directive in the Drupal .htaccess has something in it that denies access to files that start with a dot.  When I commented out the whole FilesMatch section in the Drupal .htaccess, the thumbnails were all good.

So -- do any of you know your way around .htaccess enough to help me figure out what I need to change?  Here's what I'm working with:

<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order allow,deny
  </IfModule>
</FilesMatch>


On Friday, May 15, 2020 at 8:55:08 AM UTC-5, Cheddarmonger wrote:

I found the thumbnails!  They were 604 so I reapplied the permissions to 777.

However, I’m on ver 3.1.0.  I’ll upgrade to 3.1.2 and go from there.

 

 

 

To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.

J.R.

unread,
Feb 25, 2024, 9:37:16 PM2/25/24
to gallery...@googlegroups.com
Adrian,

Many thanks for taking the time to clue us in on your customizations and tweaks and customization. I'm keeping this sort of stuff on file. I wonder how your gallery's viewers were ever able to see your thumbnails if they were set to 604?

-- J.R.

Adrian London

unread,
Feb 26, 2024, 4:17:06 AM2/26/24
to gallery...@googlegroups.com
Hi J,

Mine were never set to 604; that may have come from someone else who’s posted to this topic.

My issue was: when upgrading from PHP 7 to PHP 8, my hosting provider moved me to a new server.  There must be a config change between the two because the server running PHP 7 was able to read “dot” files without issue (“.album.jpg”) whereas my PHP 8 server couldn’t.

Whether that’s a difference between PHP versions, PHP configs or external server configs I don’t know.  I took the easy option and renamed all the album thumbnails to remove the “.” and edited the gallery code to deal with it.

I really am not sure why I bother, as I’m the only person who looks at my gallery nowadays!  They’re just my personal photos (mainly holiday/travel ones) for me and my immediate family to look at.  Even my family, who years ago would look at my photos there, now just want them sent by iMessage or WhatsApp :). I simply like tinkering, and it’s a good place to keep my photos.

The lack of a slideshow module (which died when Cooliris died) could be solved via a migration to Piwigo, which I may look at again, but even so it’s just a hobby for me really.  It passes the time on wintery days.

Adrian

Adrian London

unread,
Feb 26, 2024, 1:07:51 PM2/26/24
to gallery...@googlegroups.com
ok, found a neater solution.

I edited the “.htaccess” file in /var/thumbs as follows:

RewriteEngine On
RewriteRule (.*) /gallery/?kohana_uri=/file_proxy/$1 [L]

<Files ".album.jpg">
    Require all granted
</Files>

(And I renamed all the album.jpg files back to “.album.jpg” using a php script, and reverted my code changes.)

Adrian.


J.R.

unread,
Feb 26, 2024, 6:32:56 PM2/26/24
to gallery...@googlegroups.com, Adrian London
Adrian,

It's both frustrating and somehow rewarding when one spends all that time hassling with convoluted code, finally getting it working and then suddenly a light bulb pops and you realize "Oh, I could have just done it that way! Much easier!" But, hey, that's why we get paid the big bucks :)

-- J.R.
--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.

Adrian London

unread,
Feb 26, 2024, 6:42:03 PM2/26/24
to gallery...@googlegroups.com
Hi JR,

I used to get paid big bucks.  Well, big UK Pounds, anyway :). Now I’m taking a career break, which is why I have time for this stuff.

I think the gallery would be more useful if it had a slideshow.  I’m tinkering with the iMobile theme which at least means there could be a slideshow option if one switches themes.  I’ll start a new thread on that once I get it to a stage where it works well enough, and I can. describe what I did :)

I’ve had a play with Piwigo.  It works well out of the box, uploading photos via sFTP and then running the “synchronise” option. However, I don’t like the look&feel* so will stick with our old faithful Gallery!  It’s lovely to see people still use it.

* It looks ok, but I’ve customised my gallery so much to make it work the way I want, Piwigo just can’t match it.

Adrian.

J.R.

unread,
Feb 27, 2024, 3:13:22 PM2/27/24
to gallery...@googlegroups.com
Adrian,

Yes, a stable, well-working slide show for Gallery 3 would be great. The original slideshow that shipped as part of Gallery 3.0 was very buggy and I suspect that was because it relied on the old Flash technology (as did another G3 module called "mini slideshow). But Brad found a way to integrate an HTML-5 image uploading system into Gallery 3.1.5 -- seems to me there must also be some pure HTML-5 slide show code floating around that could perhaps be adapted?

I also tried Piwigo. Twice. But as you say, it just didn't do i for me. The main attraction for it at first is that there was an import script for Piwigo that could be used to import a Gallery 3.0 installation into Piwigo. But that was abandoned by Piwigo many years ago.

-- J.R.
--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.

Adrian London

unread,
Feb 29, 2024, 5:10:20 AM2/29/24
to Gallery 3 Users
Piwigo can import albums and photos, if you copy the /var/albums directory from Gallery3 to the galleries/ directory in Piwigo.

Then you do a synchronisation, and it creates albums based on the underlying database structure.  Of course, it names the albums the directory name, which may not be the same as the album name in Gallery3.

There is a module for Gallery3 called iptcedit which can write the title and description entered into Gallery3 into the photo's IPTC data.  You need to be brave to run it (well, have a backup of all your photos) as it writes directly to the photo file.  I've amended mine (of course!) to do all sorts of things - it takes title, description, creation date, GPS (latitude, longitude and altitude) and writes them to IPTC tags.  These are then read by Piwigo.  The only thing missing is the album names and descriptions.  I could write those to ".album.jpg" but that would need some clever scripting in Piwigo to extract those and put them in the relevant place.


I did all the above - all my photos from over 10 years ago now have correct and complete IPTC tags - so I could migrate from Gallery3 easily.  However, I've currently decided not to migrate anyway, so it was another thing done more for fun than necessity!  I do like the fact all my old photos can be downloaded with complete IPTC tags, including geotags from those photos taken many years ago with an old compact camera.

I've recently posted a "migrated to PHP 8.3" topic, as I've done that successfully.  I can answer questions people have, if anyone apart from us two are actually using this software.  I've also got the iMobile theme working well enough that it can be used, kind of, to provide some slideshow functionality.  I'll start a topic on that soon.

I'm having fun with this!  It's all ready for my next holiday.  I don't have a "proper" camera any more (sold my Canon compacts and dSLR I had, a few years ago) and just use my iPhone.  FInally, it allows the "description/caption" tag to be written.  Not the "title" though, so at least I can add a description while on holiday.  An Applescript on my laptop thenn takes the first line of "description" and writes it to the IPTC title tag, and puts the remainder back in "description".  They then upload perfectly into Gallery3. 

Adrian.


J.R.

unread,
Mar 1, 2024, 12:33:30 PM3/1/24
to gallery...@googlegroups.com
Adrian,

Very cool. You should get in touch with Brad Dutton about the possibility of including some of your code in the next release of Gallery.

-- J.R.
--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages