-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
QR-Code generation fails if the short url is not enabled #1960
Comments
Thanks for reporting. This is a tricky one. I never thought about this, so I guess it's fair to consider it a bug. However, there might be people relying on this buggy behavior, and changing it would break the experience for them. Probably, the best course of action here is to add a new config option which tells Shlink how to behave for "disabled" short URLs. This option would be released in Shlink 3.7.2, keeping existing behavior by default (QR code generation would fail while URLs are disabled), but allowing to opt-in to a behavior where QR code generation never fails. Shlink 4.0.0 would change default behavior to always generate QR codes regardless of the URL configuration, and allow to opt-in to make it fail for disabled URLs (as this is how I think it should work). This is open to change once I start working on it, as there might be some reason for things to be like this, that I'm missing now. As a temporary workaround, you can remove the start date, generate the QR code, and then add the start date back. The QR code won't change, and the URL on it will work once the start date is reached. |
This is now implemented. I will release v3.7.2 after Christmas. This version supports a new The same config option is also supported via installation tool. |
Shlink version
3.7.1
PHP version
8.2.13
How do you serve Shlink
RoadRunner Docker image
Database engine
PostgreSQL
Database version
15.3
Current behavior
I create a short url with an 'enabled since' date which lies in the future.
I then try to create a qr-code. The call fails with:
Expected behavior
I expected it to create the qr-code even before the url is enabled so that I am able to use the beneficial method of sharing via qr-code.
How to reproduce
Create a short url with an 'enabled since' date lying in the future.
Try to create a qr-code.
The text was updated successfully, but these errors were encountered: