Announcement

#1 2022-12-22 11:21:12

deemon
Member
2021-05-03
41

Piwigo 13.4.0 don't show thumbnails/pictures in mobile devices.

Hello/Hi/Greetings,

For some reason in Safari in my iPhone and also in Firefox in my Android doesn't show album thumbnails nor pictures normally. I mean the initial page with different albums does show the pictures, but when you click the album open, then there is no pictures at all, just picture names in text form.

Works perfectly fine in desktop browsers.

Using Darkroom theme.

Piwigo 13.4.0 Check for upgrade
Installed on 11 May 2016, 6 years 7 months 1 week 3 days ago
Operating system: Linux
PHP: 7.1.33-3+0~20191218.29+debian9~1.gbp18b07c (Show info) [2022-12-22 12:04:09]
MySQL: 5.5.5-10.1.48-MariaDB-1~stretch [2022-12-22 12:04:09]
Graphics Library: External ImageMagick 6.9.7-4
Cache size 222796.19 MB   calculated right now

And when I open the in question picture and copy image url in my desktop browser the image url is in
https://<site url>/_data/i/upload/2022/12/21/20221221213213-number-me.jpg
https://<site url>/_data/i/upload/2022/12/21/20221221213213-number-cu_e520x360.jpg

format, but when I did the same thing in phone, the copied image url is some gibberish where I have no idea where it comes from, like this:

https://<site url>/cdn-cgi/mirage/<a very long string of numbers and letters a-f>/1280/picture.php?/<gallery number maybe? or not>/category/_data/i/upload... and the end is the same as previously.

(and when I open this url in new browser tab in mobile phone, ofc it gives me "page not found" as there is no such url/file present in my server.)

So is this darkroom theme problem or from where the F does come this "/cdn-cgi/mirage/<a very long string of numbers and letters a-f>/1280/picture.php?/<gallery number>/category/" prefix come from for mobile devices? How can I fix this?






AAaaand when I nibble around there long enough and click through different photo sizes, then sometimes I start to even see the pictures -- I mean this one picture. But when I go to the next picture in the same album, it does not show up again for like forever and after some serious back and forth nibbling it eventually shows sometimes. Only thing that allows me to see the picture in question always is when I click the "Original" in the sizes selection, then it opens the big picture always.


edit: after some googling, this issue might be related to cloudflare proxy/cache/protection we are using... however weird is that this problem manifests itself only for mobile devices and not for desktop browsers....

edit2: cloudflare denies and tells me to contact "developers".

edit3: doesn't seem to be bootstrap_darkroom problem, because when switched to Modus theme, the problem persisted.

Last edited by deemon (2022-12-22 13:17:13)

Offline

 

#2 2022-12-22 12:29:11

erAck
Only trying to help
2015-09-06
1703

Re: Piwigo 13.4.0 don't show thumbnails/pictures in mobile devices.

Ask Cloudflare.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2022-12-22 13:17:50

deemon
Member
2021-05-03
41

Re: Piwigo 13.4.0 don't show thumbnails/pictures in mobile devices.

erAck wrote:

Ask Cloudflare.

did that. they deny and tell me to ask developers.

Offline

 

#4 2022-12-22 13:19:27

deemon
Member
2021-05-03
41

Re: Piwigo 13.4.0 don't show thumbnails/pictures in mobile devices.

When I swap to "Desktop site" in phone browser (Firefox) settings, then the site loads fine and everything is dandy with all the pictures present. So is there some sort of mobile detection and version in Piwigo that might be culprit?

Offline

 

#5 2022-12-22 14:21:08

Katryne
Member
2016-12-03
266

Re: Piwigo 13.4.0 don't show thumbnails/pictures in mobile devices.

Are you sure you use only Bootstrap Darkroom as a theme ? Maybe Smartpocket is also enabled and would need an update ?


http://photos.katrynou.fr/ v.13.7.0 https://album.chauvigne.info/ v.13.7.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#6 2022-12-22 23:45:02

deemon
Member
2021-05-03
41

Re: Piwigo 13.4.0 don't show thumbnails/pictures in mobile devices.

although our Cloudflare contact denied, having done some detective work myself, it seems it might afterall be related to CF. pfff.

well. original is:
    <img class="path-ext-jpg file-ext-jpg" src="_data/i/upload/2022/12/22/20221222144510-23d8e793-me.jpg" width="792" height="528" alt="7J2A4339.JPG" id="theMainImage" usemap="#mapmedium" title="7J2A4339 - 7J2A4339.JPG">

cloudflare altered version is:
<img class="path-ext-jpg file-ext-jpg" src="/cdn-cgi/mirage/a1eebb1b6922409fb66c2b505a2607505b1efc66c1292216554ef304c69ccfd7/1280/picture.php?/524953/category/_data/i/upload/2022/12/22/20221222144510-23d8e793-me.jpg" width="792" height="528" alt="7J2A4339.JPG" id="theMainImage" usemap="#mapmedium" title="7J2A4339 - 7J2A4339.JPG">

now the problem is, that this same cache replacement seems to work for every other picture, but for some reason the "main" picture in mobile version does not work correctly.

MOREOVER mindboggling to me and the point of the problem seems to be is how inside the cloudflare replacement cache url there is injected `/picture.php?/524953/category/` which comes from who-the-hell-knows where. At first I looked that it comes from next lines from the piwigo code from `map` html tags, however, there are only urls for previous 524952 and next 524954 pictures with also category number.

Anyway when the cloudflare url is processed the back translation to our server goes request for:
/picture.php?/524953/category/_data/i/upload/2022/12/22/20221222144510-23d8e793-me.jpg

which is absurd url and in return gives me Piwigo error page:

"
Page not found

Permalink for album not found
Click here if your browser does not automatically forward you
"

So the entire div code block with map. Through cloudflare.

Code:

  <div id="theImage" class="row d-block justify-content-center mb-3">
    <img class="path-ext-jpg file-ext-jpg" src="/cdn-cgi/mirage/a1eebb1b6922409fb66c2b505a2607505b1efc66c1292216554ef304c69ccfd7/1280/picture.php?/524953/category/_data/i/upload/2022/12/22/20221222144510-23d8e793-me.jpg" width="792" height="528" alt="7J2A4339.JPG" id="theMainImage" usemap="#mapmedium" title="7J2A4339 - 7J2A4339.JPG">

<map name="mapmedium"><area shape=rect coords="0,0,198,528" href="picture.php?/524952/category/61578" title="Previous : 7J2A4316" alt="7J2A4316"><area shape=rect coords="198,0,591,132" href="index.php?/category/61578" title="Thumbnails" alt="Thumbnails"><area shape=rect coords="595,0,792,528" href="picture.php?/524954/category/61578" title="Next : 7J2A4345" alt="7J2A4345"></map><map name="mapxxlarge"><area shape=rect coords="0,0,414,1104" href="picture.php?/524952/category/61578" title="Previous : 7J2A4316" alt="7J2A4316"><area shape=rect coords="414,0,1235,276" href="index.php?/category/61578" title="Thumbnails" alt="Thumbnails"><area shape=rect coords="1245,0,1656,1104" href="picture.php?/524954/category/61578" title="Next : 7J2A4345" alt="7J2A4345"></map>
  </div>

I'm out of ideas.

Is there some JS action that tries to replace images inside the page dynamically that could mess with this and confuse cloudflare?

Last edited by deemon (2022-12-23 01:27:40)

Offline

 

#7 2023-01-12 13:56:21

oliverfr
Member
2012-06-17
6

Re: Piwigo 13.4.0 don't show thumbnails/pictures in mobile devices.

Hey.

I allow myself to piggyback on the topic, to mention I had the exact same problem (reported in the French forum, https://fr.piwigo.org/forum/viewtopic.php?id=29965 ).

And, for me too, disabling Mirage in the cloudflare options made the problem disappear.

If someone is searching where that feature is hidden, it is in cloudflare Dashboard > Websites > precise website > (left column) Speed > (left column) Optimization > (right column) Mirage

Moreover, when I contacted cloudflare (listing my problem, and simply asking them if they thought it might be caused by their intermediation, or I should seek the origin of the problem elsewhere), the first thing they recommend me was to disable Mirage just in case, and see if it worked ┐( ̄ヮ ̄)┌

Last edited by oliverfr (2023-01-12 14:01:25)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2023 · Contact