Yourls: shareX - PHP error while using url shortner & not getting short url via application

Created on 10 Jun 2020  路  4Comments  路  Source: YOURLS/YOURLS

  • [x] I've read the Troubleshooting First Steps
  • [x] This request isn't a duplicate of an existing issue, opened or closed
  • [x] I've read the docs and followed them (if applicable)
  • [x] This is not a personal support request that should be posted on the YOURLS Discourse community

Describe the bug
Using the Application shareX with yourls url shortner, the application does not get the short url, throwing only a PHP Error in the server log.

To Reproduce
Steps to reproduce the behavior. This is mandatory if you expect someone to fix the problem. Example:

  1. Go to https://getsharex.com/ and download it.
  2. Right Click on shareX Icon in the background running apps, select Destinations > Destinations settings > Tab URL shorteners > yourls
  3. Change the API URL & API (does not matter if user & password) to your own site url, close window
  4. Right Click on shareX Icon again, and select " Open main window "
  5. Klick on Debug and select " url shortner "
  6. A window opens up, and shows you only the full url, not the short one.
  7. Check your PHP logs & also look to the server logs for 500 error.
  8. Check Adminpanel if URL got successful shorten.

Expected behavior
Getting the shorturl in the shareX Application window, after uploading any files from your pc or using the option " Upload > Shorten URL "

Actual behavior
shareX application throws a " success ", but gives you only a full url instead of short and full url.
It successful shortens the URL (Adminpanel), but fails to get the short url?

Screenshots
ShareX_2KNQ0Wm6L7
ShareX_TOFfG9bCkA

Versions
YOURLS v 1.7.9

  • Debian 9.12 / Plesk Obsidian v18.0.27_build1800200522.12 os_Debian 9.0
  • FPM application serverd by Apache (CGI & FastCGI support on)
  • nginx proxies requests to apache. Static files directly by nginx
  • PHP Version 7.3.18
  • MariaDB Version 10.1.44
  • None / Stock Plugins

Additional context
PHP Error Log

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function yourls_nonce_url() in /var/www/vhosts/tld.xx/n.tld.xx/includes/functions-html.php:528\nStack trace:\n#0 /var/www/vhosts/tld.xx/n.tld.xx/includes/functions.php(295): yourls_table_add_row('2', 'https://getshar...', 'ShareX - Screen...', '2a02:8106:20c:d...', 0, 1591823444)\n#1 /var/www/vhosts/tld.xx/n.tld.xx/includes/functions-api.php(21): yourls_add_new_link('https://getshar...', '2', 'ShareX - Screen...')\n#2 /var/www/vhosts/tld.xx/n.tld.xx/includes/functions-plugins.php(150): yourls_api_action_shorturl(false)\n#3 /var/www/vhosts/tld.xx/n.tld.xx/yourls-api.php(35): yourls_apply_filter('api_action_shor...', false)\n#4 {main}\n thrown in /var/www/vhosts/tld.xx/n.tld.xx/includes/functions-html.php on line 528'

duplicate

Most helpful comment

Thanks!
My bad for not searching the PHP Error output :/

All 4 comments

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function yourls_nonce_url() [鈥

See https://github.com/YOURLS/YOURLS/issues/2661#issuecomment-619044362 (and note: that issue is pinned).

Thanks!
My bad for not searching the PHP Error output :/

Error messages are useless if nobody uses them when looking for solutions, lol 馃槀

Wasn't sure about the error output, because there was more than one 馃槄

Going to support you guys with "Backers"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LeoColomb picture LeoColomb  路  3Comments

federico-galli picture federico-galli  路  3Comments

schapsl picture schapsl  路  4Comments

merylen picture merylen  路  3Comments

gazzola picture gazzola  路  7Comments