WordPress.org

Ready to get started?Download WordPress

Forums

YOURLS Link Creator
Error connecting to API (9 posts)

  1. Bharat Karavadra
    Member
    Posted 4 months ago #

    Hello,

    I am using WordPress 3.8.1 and YOURLS 1.0.9 and on the edit screen of the Post or Page, there is the "YOURLS Shortlink" admin widget n the right of the page.

    When I click on the "Get YOURLS" button in the widget, an error as follows appears above the title of the post or page:

    There was an error contacting the YOURLS API. Please try again.

    This disappears after a few seconds and the contents of the widgets do not appear.

    I have checked the API code and totally re-installed YOURLS and the plugin again and got a different API code but the above error happens.

    Help would be appreciated.

    Thank you,

    Bharat

    https://wordpress.org/plugins/yourls-link-creator/

  2. juanvillegas
    Member
    Posted 3 months ago #

    Check my fork of this project https://github.com/juanvillegas/yourls-wp

  3. Bharat Karavadra
    Member
    Posted 3 months ago #

    Your commit at the address does not contain anything!?

  4. juanvillegas
    Member
    Posted 3 months ago #

    mm I synced it 5 minutes ago using dekstop version, maybe try again?

  5. Bharat Karavadra
    Member
    Posted 3 months ago #

    Thank you - it's there now - but before I try it - what is the difference between your fork and Andrew Norcross's version 1.09?

    I ask as all the comments in the main php file are the same:

    /*
    Plugin Name: YOURLS Link Creator
    Plugin URI: http://andrewnorcross.com/plugins/yourls-link-creator/
    Description: Creates a shortlink using YOURLS and stores as postmeta.
    Version: 1.09
    Author: Andrew Norcross
    Author URI: http://andrewnorcross.com

  6. juanvillegas
    Member
    Posted 3 months ago #

    A client of mine needed it and the api was broken because yourls core was updated a while ago (it uses a different interface to communicate). Thats why yourls wp fails to contact the server side of yourls..

    I didnt update the comments section, but you may compare (eg. using diff) the main plugin file (yourls-link-creator.php). I also added a few css changes under lib/css.

    I will update the git repo with an appropiate readme file when I have some time :D

  7. Bharat Karavadra
    Member
    Posted 3 months ago #

    Thank you. I will give it a try when I have a quality moment.

  8. Bharat Karavadra
    Member
    Posted 3 months ago #

    juanvillegas,

    I installed you version (and removed original YOURLS version) and on an existing post when clicking on the GET YOURLS button on the right of the edit screen the error still appears at the top "There was an error contacting the YOURLS API. Please try again." and no short url is created.

    When creating a new post with the setting "Create a YOURLS link whenever a post is saved." ticked, an short URL is not automatically generated.

    I am using WP v3.9

  9. juanvillegas
    Member
    Posted 3 months ago #

    mm ok, can we follow up on github? Check the "issues" tab, and report it. Ill make sure to take a look at it.

    Anyway, from that error you are getting my guess is that your settings are wrong. Double check the Yourls Custom Url option. This option has to point to your yourls server.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.