简体   繁体   中英

Uncaught ReferenceError: wp is not defined in wordpress

i have edit or add new page on wordpress ken theme with WPBakery Visual Composer but it not load properly

its give error on console

Uncaught ReferenceError: wp is not defined at mk_upload_option (admin-scripts.js:2)

image for better understand

在此处输入图像描述

i also done step like

  1. clear cache
  2. Deactive Active plugin
  3. delete wpbakery visual composer and install new with same version

but it did not work

This could be the result of plugin conflicts, such as Autoptimize or Async Javascript. I would first try to put the following in the "exclude" section of Autoptimuize and the issue might well go away. "wp-includes/js"

If the issue persists, I would place exclude the following in both plugins:

wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js, js/jquery/jquery.min.js

Try this. It may helps. Use customizer's js file array dependency as 'customize-preview' while enqueuing.

wp_enqueue_script( 'customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '1.0', true );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM