joshp23 / YOURLS-IQRCodes

YOURLS QRCode plugin with exposed options and full integration
GNU General Public License v3.0
22 stars 11 forks source link

Fix the broken "yourls_plugin_url" call #32

Closed xtex404 closed 4 years ago

xtex404 commented 5 years ago

QRs were not displaying; server was showing a ton of 404 and 403 errors.

plugin.php was passing "dirname" for the plugin.php to yourls_plugincall(), which was creating URLs that looked like this: `<script src="https://____.sh/user/plugins/home/jmedlock/www/site1/github-plugins-YOURLS/YOURLS-IQRCodes/iqrcodes/assets/md5.min.js?v=2.1.2" type="text/javascript">`.

Added a basename so it only passed the directory name housing the plugin.php, and URLs are now correct. QR's and other assets are now loaded and shown properly.

joshp23 commented 5 years ago

I cannot reproduce your error, and these changes break the plugin for me.

When I tried your changes, the frame for the codes stopped displaying all together. Checking the source of the page draw after applying these changes, the source seems the same. However, clicking the script source urls that the plugin injects into head produced the following:

<iframe style="display:none" src="javascript:parent.location.replace('https://sho.rt'+(parent.location.hash||''))">

instead of the actual files that are supposed to be linked there.