最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

core - Wordpress 4.8 - Can't find variable: wp

programmeradmin0浏览0评论

After the update to Wordpress 4.8 my widget's textarea has disappeared and my console says:

[Error] ReferenceError: Can't find variable: wp
Global Code (widgets.php:202)

Looking at the file I can identify this line causing the issue:

wp.textWidgets.init();

Now, I've got installed many plugins but even deactivating all those I can't solve it. Any suggestion?

After the update to Wordpress 4.8 my widget's textarea has disappeared and my console says:

[Error] ReferenceError: Can't find variable: wp
Global Code (widgets.php:202)

Looking at the file I can identify this line causing the issue:

wp.textWidgets.init();

Now, I've got installed many plugins but even deactivating all those I can't solve it. Any suggestion?

Share Improve this question edited Jun 20, 2017 at 23:05 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Jun 20, 2017 at 17:26 middleladymiddlelady 5531 gold badge6 silver badges18 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

Looks like you need to enqueue the editor scripts manually, after 4.8, using wp_enqueue_editor() in your theme/plugin: https://make.wordpress/core/2017/05/20/editor-api-changes-in-4-8/

I actually had to restore manually the Wordpress core and to deactivate a function in my theme which deferred all the javascript.

发布评论

评论列表(0)

  1. 暂无评论