WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Issue between Events Manager & WP to Twitter (13 posts)

  1. owcv
    Member
    Posted 1 year ago #

    When I save an event as a draft, WP to Twitter sends it as tweet to Twitter. The same thing happens when I duplicate an event. But i don't want my drafts to be send there, unless I publish them. I think this is a bug between these two plugins. Maybe the programmers can have a look into it.

    http://wordpress.org/extend/plugins/events-manager/

  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    EM uses CPTs so Im guessing it's something the other plugin needs to check.

    r.e. duplicating, that might be unavoidable without coding something specific in to prevent that happening.

  3. Joe Dolson
    Member
    Posted 1 year ago #

    WP to Twitter works fine with custom post types generally, is there something unusual that Event manager does when creating drafts of events?

    Duplication isn't a "standard" WordPress custom post type behavior, so that would almost certainly require some kind of custom coding; no idea, without knowing more about how that's being done.

  4. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    Joe, cheers for chiming in.

    r.e. drafts, not that I'm aware of. We do convert badly submitted events into drafts but nothing special when puposely making an event published.

    forgive me for not digging into your code atm, hopefully it's a quick answer, but at what point does wp2t hook in to fire off a tweet (i.e. which hook)?

    You're right r.e. duplication, we do this ourselves, if the event is already published, it's like creatinga new post so a tweet would likely happen. I think between the two of us, we're agreeing that @owcv would need to look into duplication resulting in a tweet :)

  5. Joe Dolson
    Member
    Posted 1 year ago #

    WP2T fires on publish_{post_type} and on publish_future_{post_type}, so it really shouldn't ever fire on a draft.

    I certainly understand not diving into the code; there's a reason I'm not jumping straight into yours, as well.

    Definitely sounds like duplication would require something custom; is there an option in your plug-in to duplicate into a draft, rather than duplicating everything?

  6. owcv
    Member
    Posted 1 year ago #

    I've tested this again. When I duplicate an event it is published and not set to draft. I think, it would be a better idea, when a duplicated event is saved as a draft and not as published.

  7. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    @joedolson - we hook into bits like save_post, but then we never fire publish_... actions so not sure how your plugin is getting triggered.

    @owcv - I'd need to test this out myself to make sure, but this won't be something I can get to immediately. Am keen to make sure EM works with good/popular plugins so will certainly get to it asap.

    r.e. duplicating, I think making it a draft by default makes more sense than publishing it immediately so will look into this in an upcoming update.

    in the meantime, you could always set the post status to 'draft' and also $EM_Event->event_status to 0 by hooking into this:

    do_action('em_event_duplicate_pre', $EM_Event);

    $EM_Event is essentially an extended post object.

  8. Joe Dolson
    Member
    Posted 1 year ago #

    Seems odd. I have a hook into save_post, but it's just for saving meta data; it never runs the Twitter update. We can both do some testing, I guess. See what we find.

  9. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    thx, will update here when I get round to it, have a nice weekend! :)

  10. owcv
    Member
    Posted 1 year ago #

    Good news! Looking forward for this to be patched.

  11. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    fyi, this will be fixed in the next update (few days) and the dev version that'll be out by tomorrow.

    it had nothing to do with WP to Twitter, it was us and duplicating events as published.

    That said, drafts that are saved as drafts never get tweeted for me in my tests, the only problem i had was when duplicating an event.

  12. Joe Dolson
    Member
    Posted 1 year ago #

    Thanks for following up, Marcus - I was never able to reproduce the issue with drafts either, so no idea what that was.

  13. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    Hi Joe, thx for confirming and for making a great plugin too, I'm sure I'll be in need of that plugin at some point!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic