-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[backward comp] v5 broke v4 shared album URLs (using fragments) : provide hook for /gallery#albumID
.
#2176
Comments
It is slightly trickier than that. The first reason is that now we automatically redirect to The change v4~5 is indeed backward incompatible with that kind of sharing. However if you shared using v5 is a Major version (hence backward compatibility breaking change), indeed, this breaking change should be documented. What could be done however is to have a JS hook on fragments on the album page if you are were already sharing with Code to be changed is most likely to be found here: |
/gallery#albumID
.
Thanks for your quick answer. I noticed most of URLs I've shared look like Bye 👋 |
That is pretty much the hard case. :/ |
I think that hacky systems should not be used. How about redirect rules for the web server? I only need the album one. |
It works both for album and photo. If you were using Only thing not working is when it was shared as |
I just now tried and it does not work with |
What did I just write ? |
And I was suggesting that these should be web server redirect rules rather than in the code. |
Not possible, the web-server does not have access to the url fragment. |
That's why it is behind an environment toggle. Many thanks @ildyria, can't wait to give it a try. |
ah. Well ok then. I thought the fragment would be the same because I tested to change old link |
I would have done so otherwise :') We need to add the small hacky bit of code in the gallery page too at some point to take care of that missing redirection. |
I have to ask: Does the system use |
Nope, no more # |
If you mean on the httpd side, note that it won't be seeing the fragments. |
Yeah. Every day you learn something. :) |
Note : the workaround does not work (in my case) as it violates CSP. I tried a quick-and-dirty patch with |
@HorlogeSkynet see #2240 |
If you want to try the patch: patch-diff.githubusercontent.com/raw/LycheeOrg/Lychee/pull/2241.patch Do note that it will also push you to candidate 5.1.2 (but that can be easily reverted by doing a Once the PR is merged we will release 5.1.2 fixing this. |
Hey @ildyria, I just wanted to tell you that the patch is working like a charm 👌 I've coupled it with a simple Apache RewriteEngine On
RewriteMap v3_links "txt:/etc/apache2/sites-available/lychee_v3_links.txt"
RewriteRule "^/gallery/([0-9]+)$" "/gallery/${v3_links:$1}" [END,NE,R=permanent] ... where
Thanks, bye 👋 |
Hello 👋
Detailed description of the problem
All previous (v4) shared album URLs do not work against v5 due to LycheeOrg/Lychee-front#343 rework.
Although I fully-agree with the rationale, was the feature expected to be non backward-compatible ?
Do you think a quick client-side "hook" could be added to restore "pre-v5" URLs compatibility ?
Steps to reproduce the issue
Output of the diagnostics
Diagnostics
Diagnostics
System Information
Config Information
Browser and system
Tested on Firefox (if relevant).
Thanks ! Bye 🙏
The text was updated successfully, but these errors were encountered: