Support

Home Forums Event Espresso Premium Duplicating an event not creating new post.

Duplicating an event not creating new post.

Posted: June 14, 2018 at 10:03 am

Viewing 4 reply threads


Ted Lidie

June 14, 2018 at 10:03 am

I am using Wisdom Labs (developer recommended by event esspresso)
and they are telling me that ee3 has a bug where duplicating an event does not create a new wp post for that event it rather replaces the the previous event’s post. is there a fix for this ?


Josh

  • Support Staff

June 14, 2018 at 10:22 am

Hi Ted,

That’s not actually a bug, it’s by design. This was done because there were some concerns over duplicating blog post content and the potential negative SEO impact from the duplicated post content.

If you prefer to make it so every duplicated event also gets a post there’s a filter hook that can be used to override this. Example code follows:

function my_override_event_post_id (){
    return 0;
}
add_filter( 'filter_hook_espresso_existing_post_id', 'my_override_event_post_id' );


Ted Lidie

June 14, 2018 at 11:20 am

Awesome thank you. ill let you know that it works asap


Ted Lidie

June 19, 2018 at 12:29 pm

wisdom labs is saying the hook will not work.

“This hook was absent in the EE3 plugin code which I was using. So I downloaded the updated files from your site.
But this hook doesn’t solve the issue that we are facing. As we can only create a new post and return the post id in this filter, but we were unable to get the id of the new duplicate event which will be created after this filter.
Because of this complexity, there was no other way to solve this except for making changes in plugin code by adding an action after the creation of the duplicate event. This allows us to get the event id of the new event which we have to save in duplicate post.”


Josh

  • Support Staff

June 19, 2018 at 12:53 pm

Please ask them to open a pull request so we can understand what exactly they changed. Pull requests for EE3 can be opened here:

https://github.com/eventespresso/event-espresso-legacy/pulls

Viewing 4 reply threads

The support post ‘Duplicating an event not creating new post.’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso