WordPress.org

Ready to get started?Download WordPress

Forums

YOURLS Link Creator
[resolved] Should this plugin grab existing Yourls short URLs? (26 posts)

  1. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    I've been using Otto's plugin since he released it to generate my shortlinks. On upgrade to 3.5, it crashed on me. So I tried your plugin.

    It installs perfectly, and works great on new posts. On my test post here
    http://vudu.me/3lv
    The shortlink was made, and displays when I call for it

    But I'm not getting any of my existing shortlinks showing up for any previous posts, they come up as:
    http://voodoopress.com/?p=1608

    I'm using

    <input type='text' value='<?php echo wp_get_shortlink(get_the_ID()); ?>' onclick='this.focus(); this.select();' />

    to spit out the shortlink

    Thanks!

    http://wordpress.org/extend/plugins/yourls-link-creator/

  2. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    currently, the YOURLS API doesn't have a method for simply checking whether a custom URL has already been created or not. So passing all the site links would create URLs for all the ones that don't have one currently (it would return the existing ones for those that do).

    If you run the function on the individual post, and one already exists, it will return it. I'll take a look at Otto's plugin to see if I can add a migration feature.

  3. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    I don't see the plugin listed under Otto's available plugins. Can you send me a URL for it so I can test?

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    http://ottopress.com/2011/modified-yourls-plugin/

    I had intended to post the link, my bad!!

    It's a modified version of:

    http://wordpress.org/extend/plugins/yourls-wordpress-to-twitter/

    Basically the same, minus the twitter stuff. All of my posts have Yourls links assigned, I believe that happened when I installed Otto's p;lugin (it's been so long since I set everything up, I forget exactly what happened, and when).

    Appreciate your effort looking into this, I just wanted to make sure I wasn't doing something wrong!

  5. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    just pushed out an update that has a converter on the setting page. check it out and lemme know.

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    The button doesn't seem to do a thing for me?

    The other buttons work... save er.. saves. Restting the post count gives me a load wheel and I get a result. But the convert button just clicks... I don't get any sort of result from it. No shortlink changes on posts.

    Appreciate your work thus far!

  7. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    hmm, it's firing on my dev site. are you using Jetpack or something else that may also use the shortlink function? (make sure that the other YOURLS plugin is disabled)

    also, check to see if the old plugin was using yourls_shorturl as the postmeta key for the short URL. that's what I saw in the code, and that's what is being converted.

    otherwise, if you wanna shoot me a login, I can look closer.

  8. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    I do use jetpack, but have the mp.me shortlink business inactive

    No other plugins that should be doing anything with the shortlink function. But I'm gonna try deactivating stuff.

    $short = get_post_meta( $id, 'yourls_shorturl', true );

    looks like the right meta out of my previous plugin - which is definitely inactive

  9. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    Yeah, I just deactivated everything and running 2012 theme, still no action on that button - across browsers

  10. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    I'll need to do some more testing then.

  11. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    Much appreciated. I am hopeful that I can use your plugin!!

  12. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    got a post that it isn't showing up on that I can compare to the working test post?

  13. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    Any other post on the site! The test post was made after installing the plugin, and it worked. None of the other posts have converted.

  14. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    hmmm....struggling to find the problem. tested on a few sites, and all are converting the keys properly. any chance you can set me up with a temp admin user so I can debug the back-end to find out why they keys aren't changing?

  15. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    Otto's plugin just crashed on another site of mine (rvoodoo.com) so I tried your plugin again on that site. Worked flawlessly. That's gonna drive me crazy!

    I can get you an account on VoodooPress when I'm at a proper computer, thanks again!

  16. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    awesome. I'm guessing there's a conflict somewhere else, but I'd wanna debug with all the tools I can to find the culprit. I'm working with Ozh to have my plugin become the 'official' one, so I figure this will help others as well. thanks!

    you can use the email address norcross AT reaktivstudios.com

  17. starrwulfe
    Member
    Posted 1 year ago #

    I have a slightly different issue that's along the same lines. I recently updated some of my links to give them custom names, and also moved my server from testing to production-- getting rid of the old "test" subdomain.

    Is it possible to make a batch process that would go through and check for updated shortlinks in the YouRLs database and change them in wordpress? also maybe adding a similar function in the meta box for individual posts?

    Thanx!

  18. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    @starrwulfe can you open this issue in a new thread so we can keep the information / response separate?

  19. starrwulfe
    Member
    Posted 1 year ago #

    Sorry about that. Sure.

  20. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    @norcross, login info should be in your inbox

  21. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    @RevVoodoo - got it. taking a look now.

  22. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    OK, took a look, and the example post you mentioned didn't have an 'old' short URL stored in the DB. Not sure why, but that's what came back. I ran the converter and it looks like it updated posts:

    http://voodoopress.com/win-a-free-membership-to-elegant-themes-from-voodoopress/

    now has a correct short URL. There are some small tweaks I need to do on the plugin to fix some other stuff, but you may just need to manually fix those few that don't have one.

    I also will be including a 'bulk' uploader for people who want to set that up as well.

  23. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    Any idea why the convert button won't react on the VoodooPress backend? And thanks for peeking in there!

    But yeah, it's looking like the random posts I checked all have their Yourls back, cool! I'm happy enough to call this resolved and look forward to your updates!

  24. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    @RevVoodoo interesting enough, when I ran it is said "success" followed by "error" which I'm working on now. it did then convert the existing keys, so there is a bug in the error checking.

  25. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    That's the exact same thing that happened when I ran the converter on rvoodoo.com

    I ran it a second time and it said nothing was left to convert.

    You were able to just click and run the converter on VoodooPress? That's odd, I tried on numerous browsers on 3 different computers! Oh well, thanks much for the assistance, and the plugin!

  26. Andrew Norcross
    Member
    Plugin Author

    Posted 1 year ago #

    Yeah, the first time I clicked it, it first said 'success' then it gave the error. I opened the DB itself to check for the old keys, and none existed. so it looks like we're set.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.