WordPress.org

Ready to get started?Download WordPress

Forums

WP to Twitter
Tweet still gets sent with "Don't tweet this post" selected (5 posts)

  1. stevied
    Member
    Posted 1 year ago #

    Running version 2.5.4.

    I'm using the TwentyTwelve theme.

    I can reproduce every time.

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

  2. stevied
    Member
    Posted 1 year ago #

    I've tracked down the issue to line 1303:

    if ( empty($_POST) || ( isset( $_POST['original_post_status'] ) && $_POST['original_post_status'] == 'auto-draft' ) || ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) || wp_is_post_revision($id) || isset($_POS T['_inline_edit']) ) { return $id; }

    If I change that line by commenting out the logic that checks for the auto-draft status like so:

    if ( empty($_POST) || /*( isset( $_POST['original_post_status'] ) && $_POST['original_post_status'] == 'auto-draft' ) ||*/ ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) || wp_is_post_revision($id) || isset($_POS T['_inline_edit']) ) { return $id; }

    The "Don't Tweet/Tweet" option is no longer ignored. Other fields on the form generated by WordPress to Twitter will also stop getting ignored, too.

    I don't know enough about WordPress to know if this is going to have any nasty side effects. But I haven't seen any so far in my limited testing. There's been no spurious tweets out to my feed, for example.

    Can anyone tell me what checking for the auto-draft status is designed to protect against?

  3. Joe Dolson
    Member
    Plugin Author

    Posted 1 year ago #

    Checking against the auto-draft status is supposed to block a query to the saving of statuses on the initial creation of the auto draft.

    It's odd, but although your issue makes perfect sense to me, I can't reproduce it. Nonetheless, this was nothing but a change to increase efficiency, and backing it out is no problem, so I'm just going to do that.

  4. stevied
    Member
    Posted 1 year ago #

    My problem could be related to the fact that the database I run my server has the settings "auto_increment_increment" and "auto_increment_offset" set to something other than 1. Perhaps this is confusing WP somehow. This is just pure speculation on my part but it's caused other weird problems for me with other software that erroneously assumes that the next id in the table is one larger than the last.

    Thanks for your help!

  5. Joe Dolson
    Member
    Plugin Author

    Posted 1 year ago #

    Mmmm...maybe. Can't think of a reason that it would, but it could be possible. Not a worry. I've released the reverted version anyway; it wasn't a critical change.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.