Forum Replies Created
-
AuthorPosts
-
GillesParticipant
Thank you very much!
GillesParticipantHi Cliff,
Thank you for the reply. Here is my temporary fix, let me know if you have comments on it:
// Disable tribe select2 function when not in tribe admin screens function tribe_select2_conflict_fix() { $admin_helpers = Tribe__Admin__Helpers::instance(); if ( ! $admin_helpers->is_screen() ) { wp_deregister_script( 'tribe-select2' ); } } add_action( 'admin_enqueue_scripts', 'tribe_select2_conflict_fix', 11);
GillesParticipantI gave it a go. It is better than before. Two things I would mention:
1) My browser still appears to “freeze” during a few seconds while loading all occurrences/exceptions.
2) There is no loading indicator. An asynchronous loading indicator would be helpful to show the user that the site isn’t permanently frozen.Thank you for working on improving the user experience.
GillesParticipantThank you, I will give it a try.
GillesParticipantThank you for letting me know. I will try it out. Is there documentation for the new tribe_events_rest_use_inclusive_start_end_dates filter?
October 7, 2017 at 3:22 pm in reply to: Event aggregator disabled but still triggering HTTP GET request #1360847GillesParticipantMentioning that since I removed the license key, my website load time has decreased by 2 whole seconds.
October 7, 2017 at 2:56 pm in reply to: Event aggregator disabled but still triggering HTTP GET request #1360846GillesParticipantI removed the Event Aggregator license key (as I do not use it) and I think that did the trick. Still it would seem not that useful to check the key if all event imports are disabled.
GillesParticipantAre the dates supposed to be converted to UTC before being used in the query? because I see the following from wp-content/plugins/the-events-calendar/src/Tribe/REST/V1/Endpoints/Archive_Event.php:
[03-Oct-2017 17:54:02 UTC] Array ( [page] => 1 [per_page] => 10 [start_date] => 2017-10-03 17:00:00 [end_date] => 2017-10-04 17:00:00 [paged] => 1 [posts_per_page] => 10 [meta_query] => Array ( ) [tax_query] => Array ( ) [post_status] => publish )
GillesParticipantHello, shouldn’t the documentation for end_date say ‘Events should end before the specified date’?
start_date string (query) Events should start after the specified date end_date string (query) Events should start before the specified date
GillesParticipantIt can easily be replicated. Create a recurring event with just 15 exclusions will show the poor behavior, that is it will take a good 30 seconds to display its admin page. I don’t think you can call it a scalability issue with so few exclusions. I think scalability would be when you would reach 100 exclusions. Definitely a very poor implementation in my opinion. My guess is that some operations are unnecessarily repeated multiple times, and something is not right with the dropdown and buttonset code:
my.init_dropdowns = function() { $( '.recurrence-row .tribe-dropdown' ).tribe_dropdowns(); }; my.init_buttonset = function() { $( tribe_buttonset.selector.input ).trigger( 'change.tribe_buttonset' ); };
GillesParticipantI think I’ve mostly narrowed it down to these two function calls in my.add_exclusion:
this.init_dropdowns(); // THIS ONE if ( 'undefined' === typeof data ) { this.toggle_rule( $rule ); } // It's important to trigger the Buttonset after setup of a Recurrence this.init_buttonset(); // THAT ONE
GillesParticipantI confirm the javascript code is at fault, more specifically this part:
` if ( ‘undefined’ !== typeof data.exclusions && data.exclusions.length ) {
for ( i in data.exclusions ) {
this.add_exclusion( data.exclusions[ i ] );
}//end for
}`I printed out data.exclusions length and it came out as ’51’.
GillesParticipantTo give you a bit of a description of the event, it’s a weekly event that keeps going and has an occurrence exception once or twice every month. Right now, the event has 46 ‘will not occur on day’ exceptions.
Note that if the plugin cannot handle so many exceptions (which I think it should), it should allow us to do it in the first place.
Let me know what else you may need to debug this bug.
GillesParticipantThe javascript stack trace says it’s stuck in event-recurrence.js on my.add_exclusion.
By the way, the page sometimes finally loads after something like 5 minutes, but it’s obviously completely unusable.
GillesParticipantThe running process seems to be looping inside javascript and keeps consuming more and more memory. Activity Monitor tells me it’s at 4.09 GB of virtual men and rising.
Here is a sample extract from Activity Monitor:
+ ! : | + ! : | + ! 262 operationGetById (in JavaScriptCore) + 2231 [0x7fff95e56ce7]
+ ! : | + ! : | + ! 261 WebCore::JSHTMLFormElement::getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&) (in WebCore) + 845 [0x7fffa095145d]
+ ! : | + ! : | + ! : 261 WebCore::HTMLFormElement::namedItem(WTF::AtomicString const&) (in WebCore) + 36 [0x7fffa0630544]
+ ! : | + ! : | + ! : 236 WebCore::HTMLFormElement::namedElements(WTF::AtomicString const&) (in WebCore) + 51 [0x7fffa0630663]
+ ! : | + ! : | + ! : | 236 WebCore::HTMLCollection::namedItems(WTF::AtomicString const&) const (in WebCore) + 73 [0x7fffa060d529]
+ ! : | + ! : | + ! : | 76 WebCore::HTMLFormControlsCollection::updateNamedElementCache() const (in WebCore) + 262,382,… [0x7fffa062f4d6,0x7fffa062f54e,…]
+ ! : | + ! : | + ! : | 66 WebCore::HTMLFormControlsCollection::updateNamedElementCache() const (in WebCore) + 453 [0x7fffa062f595]
+ ! : | + ! : | + ! : | + 25 WebCore::CollectionNamedElementCache::append(WTF::HashMap<WTF::AtomicStringImpl*, WTF::Vector<WebCore::Element*, 0ul, WTF::CrashOnOverflow, 16ul>, WTF::PtrHash<WTF::AtomicStringImpl*>, WTF::HashTraits<WTF::AtomicStringImpl*>, WTF::HashTraits<WTF::Vector<WebCore::Element*, 0ul, WTF::CrashOnOverflow, 16ul> > >&, WTF::AtomicString const&, WebCore::Element&) (in WebCore) + 172 [0x7fffa060d8dc]
+ ! : | + ! : | + ! : | + ! 16 WTF::HashTableAddResult<WTF::HashTableIterator<WTF::AtomicStringImpl*, -
AuthorPosts