Page 1 of 2

Manual Thumbnail generation

Posted: 18 Aug 2025, 17:26
by omroepmuseum
Using Phoca Gallery 5.1.2 and Joomla 5.3.2:
When setting Options - tab Thumbnails - Enable Thumbnails Generation to No, manual Thumbnail Generation has following consequences: immediately one gets a message that the Thumbnails have been generated, however WITHOUT ever showing the generation progress screen.
In the Image list, there is no thumbnail shown anymore and the message "Enlarge Image" is shown. When one verifies the directory images/phocagallery/..., one sees that ALL the thumbnail-images in the "thumbs"-subdirectory have been deleted!
Setting Options - tab Thumbnails - Enable Thumbnails Generation to Yes cures the situation.
This looks like a bug to me!

Kind greetings,

Hendrik

Re: Manual Thumbnail generation

Posted: 19 Aug 2025, 12:41
by Benno
Hi,
When one verifies the directory images/phocagallery/..., one sees that ALL the thumbnail-images in the "thumbs"-subdirectory have been deleted!
I have to disagree. Only all thumbnails of the image(s) that was explicitly selected are deleted.
But maybe that's what you meant.
The second part of the task: 'Recreate Thumbnails' could not be performed because you had previously disabled it in the options.

In this example, there are three images in the category TestCat: 821518, 821519, and 821520
The Phoca Gallery category structure and the folder structure on the server are identical:

I now select image 821518, with: 'Enable Thumbnails Generation=No', mind you! and click on the 'Recreate Thumbnails' button.
Image

The following messages are now displayed:
Thumbnail(s) regenerated
and:
Enlarge Image

I agree with you that both messages are misleading:
1) Only the first part of the task: 'Thumbnail(s) regenerated' was successfully completed, the deleting of the old thumbnails of the selected original image(s). The second part could not be performed because you disabled it in the options.

2) If there is nothing, it cannot be enlarged. ;-)
Nevertheless, I am always very grateful for this message because it is displayed in the backend and frontend and is a reliable indicator that someone once again tried to generate thumbnails with: 'Enable Thumbnails Generation=No' in Phoca Gallery Options. (So it's a very helpful message for support.)
Image

The other thumbnails were not deleted in: /images/phocagallery/testcat/thumbs/
on the server and were also not deleted in the Phoca Gallery Category: TestCat.
Image

So I wouldn't call this behavior a bug, because it's not a program error but perhaps misleading messages. I hope I understood you correctly.


Kind regards,
Benno

Re: Manual Thumbnail generation

Posted: 19 Aug 2025, 20:21
by omroepmuseum
Dear Benno

I agree that not ALL the thumbnails are deleted but only the one you selected! I was aware of that but my message wasn't complete either.
About the setting "Enable Thumbnails Generation": underneath it - as a comment - following is stated:
Enable or disable Thumbnails Generation (Automatically thumbnails generation can be disabled e.g. in case some errors occur while thumbnails generating)
So, I thing there is some misunderstanding between "Thumbnails Generation" and "Automatic Thumbnails Generation". And if I remember well, the setting previously enabled or disabled the "Automatic Thumbnails Generation".
Besides, it the setting "Enable Thumbnails Generation" is set to No, NO buttons for manual thumbnail generation should be present to the user; now the user is faced with a possibility that instead of creating new thumbnails deletes existing ones.
So, whether this is a bug or not, I leave that open for discussion. But software shouldn't allow possibilities that do more harm than good!

Kind greetings,

Hendrik

Re: Manual Thumbnail generation

Posted: 19 Aug 2025, 22:26
by Benno
Hi,
Besides, it the setting "Enable Thumbnails Generation" is set to No, NO buttons for manual thumbnail generation should be present to the user; now the user is faced with a possibility that instead of creating new thumbnails deletes existing ones.
Okay. That's a feature request, but I can't say anything about its feasibility. Only Jan, the developer of all Phoca extensions, can assess what this would mean in terms of programming effort.

Kind regards,
Benno

Re: Manual Thumbnail generation

Posted: 19 Aug 2025, 22:30
by omroepmuseum
Thanks!

Hendrik

Re: Manual Thumbnail generation

Posted: 20 Aug 2025, 12:17
by omroepmuseum
Been thinking: wouldn't it be better and also easier to change the setting "Enable Thumbnails Generation" to enable or disable the AUTOMATIC generation of thumbnails (as it was before, I think).
Anyway, what is the use of this setting now? Either it is set to Yes, and then Automatic AND Manual thumbnail generation are enabled.
OK! Either the setting is set to No. Then Automatic thumbnail generation is switched off AND Manual thumbnail generation causes havoc.
Not very usefull, isn't it?

Hendrik

Re: Manual Thumbnail generation

Posted: 20 Aug 2025, 15:11
by Jan
Hi, the logic is as follows:

- if we upload images to the system, Phoca Gallery tries to examine all of them and find out which ones already have thumbnails and which ones don't
- if a thumbnail for the given image doesn't exist, it creates it and continues searching
- the parameter for disabling such a process is there so that the system can be worked with when an error occurs and the image search and creation process is stuck
- in that case we can disable this process and fix the image (delete, reduce size, etc.) and enable the process again

That is the task of this parameter, so that users don't get stuck in a stuck system.


It's just about the process of finding uncreated thumbnails and creating them.

Yes, if someone is so confused by the name of a parameter that it bothers them while working, then probably the easiest way is to rename this parameter using a language override.

Think of that parameter as an emergency brake if the system is stuck. That's its function.

Even you add manually the image to the system, then it comes to the same function always - automatic search of not created thumbnails and create them. Because there are a lot of combinations - you can add new image to system and e.g. the thumbnail for this image exists, so no new one will be created in this case. Because of independent file and database layer system, there are different processes that could be considered one, but inside there are many different processes.

Adding a new image to the system is not just one process, but more. First, the image is added to the system (database layer), but then the automatic thumbnail creation process is turned on, which is not only about creating thumbnails, but also about finding out if the given image already has a thumbnail or not (filesystem layer).

Jan

Re: Manual Thumbnail generation

Posted: 21 Aug 2025, 21:08
by omroepmuseum
Hello Jan, we upgraded to the most recent version (5.1.3) on our test website. Issue remains.
Speaking about an emergency brake. Can be very useful but I do not like emergency brakes to cause other trouble (I mean deleting existing files). So no emergency brake for us for the moment!

Re: Manual Thumbnail generation

Posted: 22 Aug 2025, 00:36
by Jan
This "emergency brake" only stops the process, it does not do anything else. It gives you a chance to fix the image and continue and not be stuck in the system, nothing more. It doesn't delete anything, it doesn't manipulate anything, it just gives you a chance to fix problems before restarting the process.

Re: Manual Thumbnail generation

Posted: 22 Aug 2025, 14:32
by omroepmuseum
The process deleted ALL EXISTING thumbnails of the selected pictures when "Enable Thumbnails Generation" is set to No and you start a Manual Thumbnail Generation (you may react that there is no point in generating thumbnails if there are already thumbnails present, but somes people - as I - do funny things).

Kind greetings,

Hendrik