admin管理员组

文章数量:1434907

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.

本文标签: coreWordpress 48Can39t find variable wp