waschinski / photo-stream

Self-hosted, super simple photo stream
https://github.com/waschinski/photo-stream
MIT License
449 stars 70 forks source link

Direct links to images does not work #14

Closed myhrmans closed 2 years ago

myhrmans commented 2 years ago

Hi there.

Tried to launch this using docker today, as you can see here: https://photoclass.myhrmans.com

Images load fine but when you open an image and copy the url to go directly to the image the following error is spotted out in the console:

Uncaught TypeError: Cannot read properties of null (reading 'getAttribute')
    at openPhoto ((index):66:29)
    at photos.js:7:1
    at photos.js:9:3

Using docker-compose.

myhrmans commented 2 years ago

Another issue I just discovered is that the social media links are still visible even if they are commented out in the .env file.

myhrmans commented 2 years ago

Looked though the code and it fails here Tried to do the same thing in devtools.. wierd... image

myhrmans commented 2 years ago

Broke with this pull: #8. Added "id-" infront of all id´s.

This file still just have the name.

Can simply be fixed by this PR: #15

waschinski commented 2 years ago

Thanks for reporting and already fixing this issue! Much appreciated! Your PR has been merged and docker images should be up soon.

Regarding the social media links, have you tried commenting them in and just leave their values empty e.g. TWITTER_USERNAME=? You should also remove the comment at the end of the URL line, I think it's only being detected as a comment when the hash is at the very beginning of a line. Please let me know if that works.

myhrmans commented 2 years ago

Awesome. If that does not fix it I will create another issue specifically for that 👍