Sub-subfolder displayed but does not open
See original GitHub issueHi!
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:
- docker version without nginx from https://github.com/bpatrik/pigallery2/blob/master/docker/docker-compose/pigallery2-only/docker-compose.yml
- v 1.9.1
Let me know if you need more information!
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (17 by maintainers)
Top GitHub Comments
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).
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), buthttps://<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: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.
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)