You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, this is only good for posts.
How can we change the code so that the custom categories are registered regardless of the post type? Is this time for a super hack or just some hardcoded category registration?
Attempting to override this, by commenting out the return, led to an error while trying to edit any oik-plugins CPT.
TypeError: Cannot read property 'presentation-background-color' of undefined
at render (https://blocks.wp.a2z/wp-content/plugins/slide/index.js?ver=1572947862:1114:31)
at renderWithHooks (https://blocks.wp.a2z/wp-content/plugins/gutenberg/vendor/react-dom.8b3dda97.js:15246:18)
at mountIndeterminateComponent (https://blocks.wp.a2z/wp-content/plugins/gutenberg/vendor/react-dom.8b3dda97.js:17480:13)
at beginWork$1 (https://blocks.wp.a2z/wp-content/plugins/gutenberg/vendor/react-dom.8b3dda97.js:18624:16)
at HTMLUnknownElement.callCallback (https://blocks.wp.a2z/wp-content/plugins/gutenberg/vendor/react-dom.8b3dda97.js:341:14)
at Object.invokeGuardedCallbackDev (https://blocks.wp.a2z/wp-content/plugins/gutenberg/vendor/react-dom.8b3dda97.js:391:16)
at invokeGuardedCallback (https://blocks.wp.a2z/wp-content/plugins/gutenberg/vendor/react-dom.8b3dda97.js:448:31)
at beginWork$$1 (https://blocks.wp.a2z/wp-content/plugins/gutenberg/vendor/react-dom.8b3dda97.js:23355:7)
at performUnitOfWork (https://blocks.wp.a2z/wp-content/plugins/gutenberg/vendor/react-dom.8b3dda97.js:22346:12)
at workLoopSync (https://blocks.wp.a2z/wp-content/plugins/gutenberg/vendor/react-dom.8b3dda97.js:22323:22)
For other posts types the results were also rather interesting.
I automatically generated a block CPT for the Slide block.
When I edited it every block became a slide.
The Chrome console log is interesting reading, showing:
Block validation failed for slide/slide
messages for each block.
Some plugins create blocks in categories that they create for themselves.
They use code like this. See https://developer.wordpress.org/block-editor/developers/filters/block-filters/#managing-block-categories
As you can see, this is only good for posts.
How can we change the code so that the custom categories are registered regardless of the post type? Is this time for a super hack or just some hardcoded category registration?
The text was updated successfully, but these errors were encountered: