Thumbnails from imgur are not displayed when filename starts with a letter

Phoca Gallery - image gallery extension
Spacecow84
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 29 Apr 2024, 13:58

Thumbnails from imgur are not displayed when filename starts with a letter

Post by Spacecow84 »

Hi,

i have issues that the thumbnails from pictures imported from imgur are not displayed.
Pictures that are starting with a letter are not working, pictures starting with a number are working.
Since I can not change the name of imgur pictures I have no idea how to get it work.

This is how the gallery looks like:
https://imgur.com/Dob3FDm

If I edit the imgur imported images, the only difference is how the filename looks like:

Working:
https://imgur.com/w05JW9W

Not working:
https://imgur.com/S0AH6hv

If i click on the broken thumbnail, the picture opens normally.

I'm using 5.0.0 on Joomla 5.1.0 with php 8.1.28

Here is the gallery:
https://sgrn.sg-retzstadt.de/index.php/bilder

Thank you for your help

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47916
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Thumbnails from imgur are not displayed when filename starts with a letter

Post by Jan »

Hi, thank you for the info, will be fixed in next version.

The hot fix:

open: components/com_phocagallery/layouts/box_image.php

change line cca 38:

FROM:

Code: Select all

echo HTMLHelper::_( 'image', isset($item->extid) & (int)$item->extid> 0 ? $item->extm : $item->linkthumbnailpath, $item->oimgalt, array( 'class' => 'pg-image c-Image c-Image--shaded', 'itemprop' => "thumbnail"));
TO:

Code: Select all

echo HTMLHelper::_( 'image', isset($item->extid) & $item->extid !=  '' ? $item->extm : $item->linkthumbnailpath, $item->oimgalt, array( 'class' => 'pg-image c-Image c-Image--shaded', 'itemprop' => "thumbnail"));
Let me know if this works for you.

Than you, Jan
If you find Phoca extensions useful, please support the project
Spacecow84
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 29 Apr 2024, 13:58

Re: Thumbnails from imgur are not displayed when filename starts with a letter

Post by Spacecow84 »

Hi,

that hot fix works perfectly, thank you very much
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47916
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Thumbnails from imgur are not displayed when filename starts with a letter

Post by Jan »

OK
If you find Phoca extensions useful, please support the project
Post Reply