简体   繁体   English

未捕获的 ReferenceError:wp 未在 wordpress 中定义

[英]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我已使用WPBakery Visual Composerwordpress ken themeedit or add new page ,但无法正确加载

its give error on console它在console上给出错误

Uncaught ReferenceError: wp is not defined at mk_upload_option (admin-scripts.js:2)未捕获的 ReferenceError: wp 未在 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删除 wpbakery 视觉作曲家并安装新的相同版本

but it did not work但它没有用

This could be the result of plugin conflicts, such as Autoptimize or Async Javascript.这可能是插件冲突的结果,例如 Autoptimize 或 Async Javascript。 I would first try to put the following in the "exclude" section of Autoptimuize and the issue might well go away.我会首先尝试将以下内容放在 Autoptimuize 的“排除”部分,这个问题很可能会消失。 "wp-includes/js" “wp-包括/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 wp-includes/js/dist/, w​​p-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.在排队时使用定制器的 js 文件数组依赖项作为“customize-preview”。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Wordpress:未捕获的ReferenceError:速度未定义 - Wordpress: Uncaught ReferenceError: Velocity is not defined 未捕获的ReferenceError:未定义google(WordPress) - Uncaught ReferenceError: google is not defined (Wordpress) 未捕获的 ReferenceError:jQuery 未在 wordpress 自定义脚本中定义 - Uncaught ReferenceError: jQuery is not defined in wordpress custom script WordPress jQuery问题,未捕获ReferenceError:jQuery未定义 - WordPress jQuery issue, Uncaught ReferenceError: jQuery is not defined 未捕获的ReferenceError:函数未定义-特定于Wordpress的问题 - Uncaught ReferenceError: function is not defined - Wordpress specific issue WordPress 4.5.3-未捕获的ReferenceError:未定义jQuery - WordPress 4.5.3 - Uncaught ReferenceError: jQuery is not defined 未捕获的ReferenceError:未定义onchange函数(wordpress) - Uncaught ReferenceError: onchange function is not defined (wordpress) JQuery 不工作:未捕获的 ReferenceError:JQuery 未定义 | Wordpress - JQuery is not working: Uncaught ReferenceError: JQuery is not defined | Wordpress Wordpress sendform抛出“未捕获的ReferenceError:sendform未定义” - Wordpress sendform throws 'Uncaught ReferenceError: sendform is not defined' WordPress Ajax Uncaught ReferenceError: url is not defined - WordPress Ajax Uncaught ReferenceError: url is not defined
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM