Skip to content
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 is generated in cache folder but not shown after short link creation #51

Open
glowfishDE opened this issue Apr 6, 2023 · 5 comments

Comments

@glowfishDE
Copy link

Hi,

the QR code is generated physically as a .png in the associated folder and can be accessed. But when you shorten a new URL you get a broken image (blank image) instead of the QR code.

When i go to the admin interface and click on "share" of the shortened link i see a working QR code displayed.
It is just not shown when the user creates his short link - which is unfortunately the most vital part.

When i try to access the picture URL of the non existing picture i get:

"FAIL: bad access key"

Comparing to the correct displayed QR code in the admin "Share" section the URL has a totally different key in it.

It seems the key is not calculated correctly on creation or something like this. Seems to be a bug.

Can you please help to fix this?

Thanks

@PrieserMax
Copy link

Have the same problem.
When it doesn't get shown at creation, it doen'z work in the admin section too in my case.
The png ist always accessible via adding .qr at the end of the short URL.
Greetings from Germany.
Max

@tofuSCHNITZEL
Copy link

have you checked you nginx settings / apache htaccess file?
https://yourls.org/docs/guide/server-configuration
what is displayed if you copy the QR url in the backend and open it directly?

@DirkLerner
Copy link

Having the same issue as @glowfishDE described. Can't see any QR-code images in the admin interface.
When I copy the URL of the QR-pic, paste it into a new browser tab I get the message:

FAIL: bad access key

If I add '.qr' to the short url the qr code is shown.

I have investigated into the URLs and they are different according the png-file:
?id=iqrcodes&key=4ef2f14e6e85b56cacd4cba25384a048&fn=qrc_ed8219134efb73dfc71572434ed089c2.png
(doesn't work, png-file does not exist, url behind pictures in the admin area)
?id=iqrcodes&key=587798793b2da16bb035b0c05fd064ba&fn=qrc_9fb872b1a3f20060870e29714384375c.png
(works, png-file exists, redirected from short url with .qr at the end)

Greets,
Dirk

@DirkLerner
Copy link

Hi,
creating a ne short URL, the QR code is shown in the result page. Whe I now copy the URL of the visible QR code it does even not work:
...fn=qrc_b057a698f022ccbb5dede642d9deb7fb.png (the png-file exists by the way)
Error message is: FAIL: bad access key
After reloading the page the link to open the qr code in a new window works for a while, then the same message appears.
So, if I create new short links after I had installed the plugin it seems to work, more or less.

The short link with '.qr' at the end produces a new qr code image:
...fn=qrc_7155163deed041c7d9bf10554690d83e.png
This one is shown in the browser but different that the one in the admin interface. But both are working and redirecting finally to the correct long url.

All qr codes generated with the Mass QR Code Generation are not shown in the Admin interface but have the same image like generated by the short URL with '.qr' at the end.

Conclusion: the admin inteface 'generates' a different filename for the qr-code-image and therefore 'fails'.

Kind regards,
Dirk

@DirkLerner
Copy link

Hi all,

finally I found the reason for the issue on my site. After digging through the code I recognized that if YOURLS_SITE is used for generating the name of the qr-code image it is different.

I had in the config.php a trailing slash defining YOURLS_SITE. After removing the trailing slash from the url all is good now.
I know, it's written not to do that, but mistakes happen.

Hope this helps someone else.

Dirk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants