Recurring events w/ a lot of exclusions breaks event

Home Forums Calendar Products Events Calendar PRO Recurring events w/ a lot of exclusions breaks event

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1422975
    jon
    Participant

    If you have a recurring event with a large number of exclusion dates, it breaks the recurring event. It stops generating new event dates, and it also hangs the edit page so you can’t edit the event at all because it’s trying to load all the of the exclusions. There was another thread that acknowledged this bug: https://theeventscalendar.com/support/forums/topic/saving-recurring-event-does-not-complete-error-503504/ but I don’t see it under the “known issues” page, and it still has not been solved. Is this still considered a known bug, is it being worked on, etc? Increasing my memory / max execution time is not a reasonable request either, the code needs to be optimized better.

    #1424195
    Victor
    Member

    Hi Jon!

    Thanks for taking your time to report this.

    I have been able to track down a report for this issue and is something we are still looking to fix in a future maintenance release of our plugins. I will set this thread’s status as “Pending fix” and link it to the report. This way we’ll notify you as soon as a fix is shipped.

    Unfortunately, there is no workaround for this issue and you can only prevent it by not setting up so many exclusions for each event.

    Regarding the known issues page, we only list there the ones we’ve identified as significant, high-priority issues. Do rest assure we do take all our issues seriously and we strive to tackle as many as we can with each release.

    We apologise for the inconvenience and we appreciate your patience in the meantime.

    Best,
    Victor

    #1424201
    jon
    Participant

    Thanks Victor. Is there any ideas from the dev team on what might be causing the load issues? If I solve the problem myself, can I submit a patch to you somehow for inclusion? Or is it a closed development process where you don’t accept fixes?

    #1424589
    Victor
    Member

    This reply is private.

    #1425309
    jon
    Participant

    I tried uploading the patch file here but it wouldn’t let me, I’ve hosted it on dropbox: https://www.dropbox.com/s/s75cecxnz8ktmg6/__fix_select2_dom_processing_issues_with_recurring_event_exclusions.patch?dl=0 this is based on Events Calendar Pro Version 4.4.20.1 and edited events-recurrence.js. I’ll also summarize my changes below in case that helps. Basically this removes the select2 initialization on page load, and moves it into only initializing the select2 when the fields are revealed to the dom. This happens either when you change the recurrence type (month, year, etc) or when you view the details of an existing one by clicking view details. Using my patch with only 17 exclusions my backend page dom loads in 5.6 seconds (this is a pretty resource intensive site on its own). Without my patch it takes 31.21 seconds to load.

    — REMOVE Lines 128 – 130 —
    my.init_dropdowns = function() {
    $( ‘.recurrence-row .tribe-dropdown’ ).tribe_dropdowns();
    };

    — Add under my.event.recurrence_type_changed = function() { —
    $rule.find(‘.tribe-dropdown’).tribe_dropdowns();

    — Add under my.toggle_rule = function( $rule, state ) { [under each $rule.addClass(‘tribe-open’) lines] —
    $rule.find(‘.tribe-dropdown’).tribe_dropdowns();

    p.s. this could be optimized further as it looks like the select2 is used on a lot of elements that really don’t need it. Most of the select boxes only have 1-3 options, so the select2 is basically useless and only serves to suck up dom bandwidth. I would suggest using it only on elements that truly need it like the month tag picker element. Decisions like that would need to come from your dev team however, so my patch only includes the basics necessary to speed it up.

    • This reply was modified 8 years, 3 months ago by jon.
    • This reply was modified 8 years, 3 months ago by jon. Reason: added addendum
    #1426607
    Victor
    Member

    Hi Jon!

    Right on! Thanks so much for submitting that patch you’ve made so far!

    I applied the patch myself and it does prevent the select2 from being rendered, thus preventing the page freezing.

    I will make sure to pass this along to the bug report as well as all your notes about the issue. We appreciate all your help and effort trying to solve the issue.

    We’ll keep you posted for any update on our side for this.

    Best,
    Victor

    #1454095
    Nico
    Member

    Hi there,

    Just wanted to share with you that a new maintenance release is out, including a fix for this issue. We are aware there’s more room for improvement around this area, but hopefully these initial improvements will alleviate the situation for now.

    Find out more about this release → https://theeventscalendar.com/maintenance-release-for-the-week-of-12-feburary-2018/

    Update the plugins and let us know if the fix works for your site,
    Cheers,
    Nico

    #1474726
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Recurring events w/ a lot of exclusions breaks event’ is closed to new replies.