Autocomplete search breaks the tribe-events-bar change view functionality

Home Forums Calendar Products Filter Bar Autocomplete search breaks the tribe-events-bar change view functionality

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1113628
    Kari Turunen
    Participant

    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

    #1113632
    Kari Turunen
    Participant

    This reply is private.

    #1113648
    Kari Turunen
    Participant

    This reply is private.

    #1114095
    Nico
    Member

    Hey 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,
    Nico

    #1119781
    Support Droid
    Keymaster

    This 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.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Autocomplete search breaks the tribe-events-bar change view functionality’ is closed to new replies.