• Hi,

    I’m getting this error after the latest 4.10 update. Search is not working at all (suggestions don’t appear, when I click on Search nothing happens)

    Uncaught TypeError: Event is not a constructor
    at asl-prereq-and-wrapper.js?ver=4751:801:28
    at asl-prereq-and-wrapper.js?ver=4751:802:2

    When I switch to Legacy jquery mode, it works again.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi,

    Something is overriding the global “Event” variable in your javascript scope with it’s own object. That variable was accidentally created in the global javascript scope by a 3rd party script, instead of as a local variable.
    I believe the script causing the issue is: https://www.masterdc.com/mydata/themes/new-masterdc/js-min/modal-min.js
    The Event is declared as a constant within the global variable scope. This whole file should be either wrapped in an anonymous function or if these variables are needed globally, then they should be wrapped within an object as attributes instead.

    The original Event object is used for creating javascript events, which our code uses as well. That no longer works in your page, as the Event variable is overwritten.

    The best course of action is to contact the creator of that code to correct that, as developers do use the Event object from time to time to create custom events.

    Best,
    Ernest M.

Viewing 1 replies (of 1 total)
  • The topic ‘Search not working after 4.10 update’ is closed to new replies.