Events Manager
[resolved] Recurring events duplicated when edited (7 posts)

  1. amsross
    Posted 2 years ago #

    When creating new Recurring Events, child/attached events are created as expected. If that Recurring Event is then updated, though, more child/attached events are then created.

    ex: Creating an event with two recurrences will create 2 child events. Updating the title will create an additional 2 child events. Changing the content will create an additional 2 child events. After this I have 6 child events (two for the first recurrence and 2 for the second).

    Is this what is supposed to be happening?


  2. angelo_nwl
    NetWebLogic Support
    Posted 2 years ago #

    creating or updating a recurring event will delete everything and recreate new sets of recurrences; can I know what is your current EM version ?

  3. amsross
    Posted 2 years ago #

    I'm currently using v5.5.3.1.

    Here is a demo/example of what happens when I create and then edit the content of a recurring event: http://imageshack.com/i/f0155wgZg

    Deleting the recurring event does not delete the spawned events.

    The events have custom fields associated with them.

  4. caimin_nwl
    NetWebLogic Support
    Posted 2 years ago #

    Are you using any custom code for Events Manager, especially something related to recurring events?

    What version of WordPress are you using? Is it a regular install of WordPress or a multisite installation?


  5. amsross
    Posted 2 years ago #

    I'm using WP v3.9.1 with a standard install (no multi-site, etc). The theme I'm using is based on roots (https://github.com/roots/roots).

    I'm hooking into the following filters in my theme:
    em_accepted_searches, em_event_output_placeholder, em_events_build_sql_conditions, em_events_get, em_events_get_default_search.
    All of the filter functions require that is_admin() be false before executing, so I can't imagine how they would affect the actual creating/updating of events. Additionally, I've tried removing all of my custom functions.php code and still encounter this issue.

  6. amsross
    Posted 2 years ago #

    It appears the issue is caused when custom fields are being used on Recurring Events (through Advanced Custom Fields, here). If I enable them on event, everything works as expected, but when I enabled them for event and event-recurring, the duplication issue arises.

    I have tried toggle "Enable Custom Fields" in the Events Manager Settings but this didn't change anything.

  7. amsross
    Posted 2 years ago #

    Ok, I've done some additional debugging and trial-and-error now that the issue has been narrowed down to being ACF-related.

    After reviewing the custom fields that have been attributed to event and event-recurring I noticed a field called event_id which I figured might be a reserved name.

    Bingo! I namespaced it and everything is working as expected.

    Thankyou for your responses to my issue!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic