Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter hayesmd

    (@hayesmd)

    On bitly it is showing the right URL for the post, but the shortlink goes to the wrong page on our site: https://bitly.com/1mBbEyu+

    Thread Starter hayesmd

    (@hayesmd)

    Just noticed this but the shortlinks are different from what I get on the post and what is displayed on bitly.com as the generated link.

    Either way both shortlinks go to the wrong URL.

    Thread Starter hayesmd

    (@hayesmd)

    Seems like this part of the Changelog may be the problem:

    Removed wpbitly_generate_shortlink() from save_post

    I have a hunch that when the Template plugin is bringing its stuff into the post editor is when the shortlink is created and it’s pulling the template URL and not the post URL.

    Can you send me the code and location to add it and I can test if that is the problem? The version 2.2.4 or which ever was immediately before this one worked just fine.

    Mark

    (@delayedinsanity)

    add_filter( 'save_post', 'wpbitly_get_shortlink' );

    Line 208 of wp-bitly.php

    I’ll have to do more testing on that. After creating the debug file, I noticed wpbitly_get_shortlink was being fired four times in rapid succession (not from drafts or revisions) and was hoping to cut down on that.

    Thread Starter hayesmd

    (@hayesmd)

    Sorry, that did not fix it. Hate to say but the official plugin worked just fine. I may have to enable that one for now until this gets resolved. I have this on 9 different sites, so I’ll keep one with wp_bitly to keep an eye on the issue.

    Mark

    (@delayedinsanity)

    I’m sorry, I gave you the wrong code.

    add_action( 'save_post', 'wpbitly_generate_shortlink' );

    Is what you want, not wpbitly_get_shortlink.

    Mark

    (@delayedinsanity)

    I just checked… I’m not sure when I removed the post types check. ?? It’ll be back in there on the next release.

    I blame confusing work and play.

    Mark

    (@delayedinsanity)

    Hayesmd, I’ve just peppered the forum with this question so it can’t hurt to keep going; would you care to try beta testing the next copy before I release it as a version update?

    Less releases, more bug fixes is the plan, and I haven’t quite got the hang of unit testing for this yet.

    Thread Starter hayesmd

    (@hayesmd)

    Sure, I don’t mind loading beta’s on less important sites of ours. We have 7 or 8 sites that rely on this plugin, so it only makes sense for us to do our part and help out where we can. I can definitely load it on 1 or 2 where the shortlinks get posted to Facebook daily so the writer can definitely let me know of their experience.

    Mark

    (@delayedinsanity)

    Send me your email, through this if you don’t want to post it here (and I understand not wanting to, which is why I’m offering the link!).

    Thread Starter hayesmd

    (@hayesmd)

    Just sent through the link.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Generating for wrong link’ is closed to new replies.