question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sub-subfolder displayed but does not open

See original GitHub issue

Hi!

I’m setting up pigallery2 for the first time on my Raspberry Pi 3B. I’m using the docker image without nginx, but with pigallery2 as a subdirectory of my Apache vhost for Nextcloud (using ProyPass etc.), so that my Nextcloud is reachable on https://subdomain.domain.com and Pigallery2 on https://subdomain.domain.com/photos . I struggled a bit to get it to use the pictures from Nextcloud but managed using symlinks to my storage disk /app/data/images/user -> /mnt/raid1/clouddata/user/files/gallery by adding a volume /mnt/raid1/clouddata:/mnt/raid1/clouddata:ro into docker-compose.yml. So far so good, but the background may be relevant to my problem.

Now, whether I create a sub-subfolder inside the images folder in the symlink’d Nextcloud folder or directly manually in the images folder, I can index and visualize the pictures in the main and in the first subfolder, but clicking on the sub-subfolder brings me back to the main images folder. Is this an expected limitation of pigallery2 or a real bug?

Docker-compose excerpt:

...
volumes:
      - "/mnt/raid1/pigallery2/config:/app/data/config"
      - "db-data:/app/data/db"
      - "/mnt/raid1/pigallery2/images:/app/data/images:ro"
      - "/mnt/raid1/pigallery2/tmp:/app/data/tmp"
# clouddata for symbolic links:
      - "/mnt/raid1/clouddata:/mnt/raid1/clouddata:ro"
...

Images folder:

pi@host:/mnt/raid1/pigallery2/images $ ls -l
total 12
-rw-r--r-- 1 root root 7005 Jul 14  2014 OXegP.gif
lrwxrwxrwx 1 root root   46 Feb 13 17:52 simon -> /mnt/raid1/clouddata/simon/files/Photos_albums
pi@nextcloudpi:/mnt/raid1/pigallery2/images $ sudo ls -l --recursive simon/
simon/:
total 11196
drwxr-xr-x 1 www-data www-data      46 Feb 13 17:53 Albumtest1
-rw-r--r-- 1 www-data www-data 6251748 Feb 13 12:16 IMG_20220213_121645.jpg
-rw-r--r-- 1 www-data www-data 5206151 Feb  9 13:53 PANO_20220209_135304.jpg

simon/Albumtest1:
total 6684
-rw-r--r-- 1 www-data www-data 6842915 Feb 13 13:33 IMG_20220213_133344.jpg

Web app: In the web app, I can see the folders images/simon and images/simon/Albumtest1 and their thumbnail, as well as the pictures in images/ and in images/simon/, but not in Albumtest1.

Docker logs: docker logs pigallery2 shows nothing much after server start listening on port 80:

...
NODE_ENV environmental variable is set to debug, forcing all logs to print
2/13/2022, 5:27:17 PM[DEBUG][Worker] Worker is waiting for tasks
2/13/2022, 5:27:17 PM[DEBUG] GET /gallery/ 200 83ms
2/13/2022, 5:27:17 PM[DEBUG] GET /styles.9e38d4b881bc215683fa.css 200 62ms
2/13/2022, 5:27:17 PM[DEBUG] GET /assets/icon.png 304 33ms
2/13/2022, 5:27:17 PM[DEBUG] GET /polyfills-es2015.22a1d610edd57ce6362c.js 200 79ms
2/13/2022, 5:27:17 PM[DEBUG] GET /runtime-es2015.8413ad8beac169f353b4.js 200 40ms
2/13/2022, 5:27:17 PM[DEBUG] GET /main-es2015.e717c0e9b049b0d3a128.js 200 91ms
2/13/2022, 5:27:18 PM[VERBS] GET /api/user/me 200 13ms
2/13/2022, 5:27:18 PM[VERBS] GET /api/notifications 304 148ms
2/13/2022, 5:27:18 PM[DEBUG] GET /assets/icon_inv.png 304 17ms
2/13/2022, 5:27:19 PM[VERBS] GET /api/gallery/content/ 304 187ms
2/13/2022, 5:27:19 PM[DEBUG] GET /manifest.json 304 8ms
2/13/2022, 5:27:19 PM[DEBUG] GET /assets/icon.png 304 8ms
2/13/2022, 5:27:19 PM[DEBUG] GET /open-iconic.42125a176cf7bfb24819.woff 304 8ms
2/13/2022, 5:27:19 PM[DEBUG] GET /assets/icon_inv.png 304 10ms
2/13/2022, 5:27:20 PM[VERBS] GET /api/gallery/content/simon 304 86ms
2/13/2022, 5:27:21 PM[VERBS] GET /api/gallery/content/?klm=1644771143731&kls=1644771151468 304 37ms

Environment :

  • OS: server on raspbian (debian), browser on Android
  • Browser: chrome on Androis

Used app version:

Let me know if you need more information!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
zigmhountcommented, Feb 26, 2022

Thanks for the example GPX file! I’ve put that one in the album folders, it’s unfortunately not displayed either on the gallery page, both on my laptop and on the rpi (both with the nightly docker image).

Can you try logging in, then opening in a separate browser https:///photos/api/gallery/content/subfolder1/subsubfolder (so not with%2 but with / ) and see what happens.

Navigating to the subsubfolder on my local instance shows the URL http://localhost:81/gallery/subfolder%2Fsubsubfolder in my browser, however pointing the browser directly at http://localhost:81/gallery/subfolder/subsubfolder just brings up pigallery2’s loading and welcome page. On the rpi, opening the URL https://<mydomain>/photos/gallery/subfolder1/subsubfolder does the same (loading and welcome page), but https://<mydomain>/photos/gallery/subfolder1%2Fsubsubfolder brings error 404 (like the console was saying). Instead of permissions (my current image/ folder structure is all in the same local folder, not a single symbolic link) I looked into Apache’s rules to somehow decode this %2F, and following this thread I added the following to my apache config:

AllowEncodedSlashes NoDecode
# Pigallery2 docker container exposes to port 1234
ProxyPass        http://localhost:1234 nocanon

Aaand voilà, the sub-subfolder issue is resolved! I hope that this post helps other people someday 😃

The GPX issue is however not due to Apache since it’s also failing using the pre-containerized Nginx proxy.

1reaction
bpatrikcommented, Mar 5, 2022

I do not mind adding this. A separate feature request would be great. Better would be a pull request 😃 (I dont have that much time for this project)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documents Won't Open Inside A Subfolder
I have a few documents inside a subfolder and whenever I double-click or right-click and then select 'open' it won't open, however, ...
Read more >
Contents of project subfolder not beeing displayed in Solution ...
I have cloned a repository (github : kit-parco/networkit) using VS 2019 and opened it in “open folder” mode. The project itself contains a...
Read more >
sub folders are listed but will not open - Mozilla Support
Now, I cannot access the subfolders under the main folder. They are all listed and some even show that they have new unread...
Read more >
Folders and Files do not open in the Hosted Files Folder
Answer: · Open Mozilla Firefox · Click Menu (displayed as 3 horizontal bars) · Click the Open Help Menu button (Displayed as a...
Read more >
I can't seem to get my subfolder to be visible. What can I do?
To confligrate things even more, 2 files are showing up within my main "work" folder, but NONE of the sub-folders are visible at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found