Hi,
my situation is as follows:
We have a site where we have installed the The Events Calendar, The Events Calendar PRO, Community Events and Filter Bar -plugins. If we have set any of the filters in filter bar to type autocomplete and then try to change the view in tribe-events-bar it outputs to console the following error message: “Uncaught TypeError: Cannot read property ‘length’ of null”. To my understanding the problem is in code in file the-events-calendar>src>resources>js>tribe-events-bar.js in row 322
It is now:
if ( $this.val().length && !$this.hasClass( 'tribe-no-param' ) ) {
I think that if you change the if-checks to something like this:
if ( $this.val() && $this.val().length && !$this.hasClass( 'tribe-no-param' ) ) {
it would fix the problem.
I think the problem occurs, because in Filter Bar there is select-element bind with the autocomplete input and in tribe-events-bar.js in row 318 the code picks up the both the input and select -element of form#tribe-bar-form and div#tribe_events_filters_wrapper. The select element has no value at the beginning so the $this.val() returns undefined.
I’ll send screenshots and live-site url in a private reply.
Thanks!
Sauli Rajala
Valu Digital