- This topic has 8 replies, 2 voices, and was last updated 3 years, 1 month ago by David.
-
AuthorPosts
-
February 24, 2021 at 2:34 pm #1671285Annamari
Hi,
I have a problem with the sticky menu: it won’t work even when switched on.
When I load the Customizer, I can see a lot of error messages in the Console:
Uncaught ReferenceError: _ is not defined at wp-util.min.js:2 at wp-util.min.js:2 backbone.min.js:2 Uncaught TypeError: Cannot read property 'extend' of undefined at backbone.min.js:2 at backbone.min.js:2 at backbone.min.js:2 wp-playlist.min.js:1 Uncaught ReferenceError: _ is not defined at wp-playlist.min.js:1 customize-selective-refresh.min.js:2 Uncaught TypeError: Cannot read property 'Value' of undefined at customize-selective-refresh.min.js:2 at customize-selective-refresh.min.js:2 customize-preview-widgets.min.js:2 Uncaught ReferenceError: _ is not defined at customize-preview-widgets.min.js:2 customize-preview-nav-menus.min.js:2 Uncaught ReferenceError: _ is not defined at customize-preview-nav-menus.min.js:2
I tried disabling the plugins but see no improvement.
Thanks for any help,
AnnamariFebruary 25, 2021 at 1:14 am #1671712DavidStaffCustomer SupportHi there,
we may need admin access to see what is ‘breaking’ the customizer but what i notice on the Front End is the Testimonial Slider is not working and throwing a javascript error. One JS error can cause all subsequent scripts to not work correctly.
Could you test the site without the slider in place ?
February 25, 2021 at 2:30 am #1671798AnnamariHi David, thanks for your reply.
I can see the slider working on the front page… and if I switch it off, I still see the error messages in the customizer too. 🙁
I’m sending you the admin access below.
Thank you,
AnnamariFebruary 25, 2021 at 3:55 am #1671901DavidStaffCustomer SupportCan you temporarily disable the Elements Module to check if any codes using a Hook element is conflicting ?
February 25, 2021 at 4:10 am #1671920AnnamariGreat idea, David. It’s something in the Elements. When I disabled it, the sticky menu started to work too.
Thanks!February 25, 2021 at 4:14 am #1671921AnnamariIt’s the Facebook pixel code. :O
February 25, 2021 at 4:20 am #1671935DavidStaffCustomer SupportOh thats not one i would have guessed. You can try adding this PHP Snippet to stop that hook callback from running in the Customizer:
add_filter( 'generate_hook_element_display', function( $display, $element_id ) { if ( 10 === $element_id && is_customize_preview() ) { $display = false; } return $display; }, 10, 2 );
The
10
needs to be changed to the Hook Elements ID ( you can find that in the browser URL when editing the HookID=XXX
)February 25, 2021 at 4:39 am #1671961AnnamariI’ll figure out how to do this because this is what stops the sticky menu from working too, so it’s not enough to stop running the code in the customizer.
Thanks for your help, David!
February 25, 2021 at 5:51 am #1672035DavidStaffCustomer SupportYou’re welcome!
-
AuthorPosts
- You must be logged in to reply to this topic.