Home › Forums › Calendar Products › Filter Bar › Autocomplete search breaks the tribe-events-bar change view functionality
- This topic has 4 replies, 3 voices, and was last updated 7 years, 11 months ago by Support Droid.
-
AuthorPosts
-
May 11, 2016 at 11:43 pm #1113628Kari TurunenParticipant
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 DigitalMay 11, 2016 at 11:52 pm #1113632Kari TurunenParticipantThis reply is private.
May 12, 2016 at 12:21 am #1113648Kari TurunenParticipantThis reply is private.
May 12, 2016 at 6:10 pm #1114095NicoMemberHey Sauli,
Thanks for reaching out and for the report as well!
We already have a bug ticket for this issue. The report is pretty recent but I hope we can see in the maintenance release (4.2.1) coming out after the next major release (4.2). For now you patch is a great work around! Just be sure to check the release logs to see if this functionality was included.
Please let me know if there’s anything else I can do for you,
Best,
NicoMay 27, 2016 at 9:35 am #1119781Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Autocomplete search breaks the tribe-events-bar change view functionality’ is closed to new replies.