Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enqueue block-editor.js dependencies that I didn't enqueue before #170

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

kienstra
Copy link
Contributor

@kienstra kienstra commented Nov 9, 2023

Changes

  • Enqueue block-editor.js dependencies that I didn't enqueue before
  • I actually didn't use dist/block-editor.asset.php, nothing referenced that

Fixes #168

@@ -134,7 +134,7 @@ public function editor_assets() {
wp_enqueue_script(
$js_handle,
$this->assets['url']['entry'],
[],
Copy link
Contributor Author

@kienstra kienstra Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the dependencies argument [] instead of $js_config['dependencies'] in c347a98.

That was to prevent this PHP warning on /wp-admin/widgets.php:

Notice: Function wp_enqueue_script() was called incorrectly. "wp-editor" script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see Debugging in WordPress for more information. (This message was added in version 5.8.0.) in wp-includes/functions.php on line 6031

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that warning is less important now.

Default themes like Twenty Twentythree don't have widgets, and widgets are soft-deprecated in favor of site editing.

@kienstra
Copy link
Contributor Author

kienstra commented Nov 9, 2023

CI/CD will pass once we merge #171

@kienstra kienstra mentioned this pull request Nov 9, 2023
@johnstonphilip
Copy link

Replicated:
Screenshot 2023-11-09 at 11 48 03 AM

Fixed on this branch:
Screenshot 2023-11-09 at 11 48 20 AM

@kienstra
Copy link
Contributor Author

kienstra commented Nov 9, 2023

Thanks so much, @johnstonphilip! Good to see your screenshots.

@kienstra kienstra merged commit ff6cda9 into develop Nov 9, 2023
4 of 12 checks passed
@kienstra kienstra deleted the fix/block-preview branch November 9, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing dependencies on wordpress 6.4
2 participants