PHP error (notice) when adding a new page/post/cpt
grahammtbr opened this issue · comments
There's always one more... LOL I get this a notice in Query Monitor when adding a new page/post/cpt. I don't get it when editing an existing post.
WP_Block_Type_Registry::register was called incorrectly. Block type "sober/intervention-block-editor" is already registered. Please see Debugging in WordPress for more information. (This message was added in version 5.0.0.)
@grahammtbr hah, thanks for testing so much, it's been a big help!
Do you mind sending through the intervention config for this one? Looks like the same error that was happening for the block editor under posts/pages.
Here's my config:
return [
'application' => [
'site' => [
'membership' => false,
'default-role' => 'editor',
'timezone' => 'America/Vancouver',
'date-format' => 'F j, Y',
'time-format' => 'g:i a',
'week-starts' => 'Sun',
],
'writing' => [
'emoji' => false,
],
'discussion' => [
'post.ping-flag' => false,
'post.ping-status' => false,
'post.comments' => false,
'avatars' => false,
],
'media' => [
'mimes.svg' => true,
],
],
'wp-admin.all' => [
'common.adminbar.wp',
'common.adminbar.comments',
'common.adminbar.user.howdy' => 'Hello,',
'common.adminbar.user.avatar',
'common.adminbar.user.profile',
'common.footer.credit' => 'Created for 900 Degrees Wood-Fired Pizza by AMT Marketing.',
'common.tabs.help',
'dashboard.home.welcome',
'dashboard.home.notices',
'dashboard.home.activity',
'dashboard.home.right-now',
'dashboard.home.recent-comments',
'dashboard.home.incoming-links',
'dashboard.home.plugins',
'dashboard.home.quick-draft',
'dashboard.home.drafts',
'dashboard.home.news',
'comments',
'comments.all',
'posts.title' => 'Blog',
'posts.all.title.page' => 'Blog Posts',
'posts.all.title.menu' => 'All Blog Posts',
'posts.item.trackbacks',
'posts.item.discussion',
'pages.item.discussion',
],
];
@grahammtbr , struggling to replicate this side. Have you got the latest version? This commit should have the fix.
Okay, I just realized that this only occurs on my local dev environment (docker, specifically 10up's docker). So not a true issue, but still odd.
Yes, commenting out “pages.item.discussion" removes the error.
I ended up re-working the block editor enqueue and adding in some checks to avoid enqueuing multiple times. 623bb1c
Hey, sorry for the late reply. I updated with the latest commit, and it fixed the issue. Thanks for that!
No problem! Thanks for always reporting and bringing to my attention. If you find anything else let me know!