admin管理员组文章数量:1391918
I created a block template and attached it to my cpt and I get this message on the post page neither of the two buttons or the two links in the vertical dot button work unless I disable $pages_type_object->template_lock = 'all';
So how can I get rid of this message and keep the $pages_type_object->template_lock = 'all';
?
I created a block template and attached it to my cpt and I get this message on the post page neither of the two buttons or the two links in the vertical dot button work unless I disable $pages_type_object->template_lock = 'all';
So how can I get rid of this message and keep the $pages_type_object->template_lock = 'all';
?
2 Answers
Reset to default 1seems my problem was in my array
'level' => '3',
should've been
'level' => 3,
There sounds like there may be a couple issues going on.
Regarding the message "this block contains unexpected or invalid content": That message is occurs when the Gutenberg has noticed that the HTML that is to be generated (stored in the post_content column of your database) has changed in an unexpected.
This issue occurs very often and best practices of how block developers should avoid is not resolved.
Secondly, the resolve
and the convert to hotel
buttons should both respond to you when you click or select the button, by displaying an html block with your code. If you click or select either button and nothing happens, then there is possibly a bug with the Gutenberg editor or a bug with your custom post type code. It's hard to diagnose what could the issue be unless you share more code but as a start, I'd recommend installing the query-monitor plugin to see if there's any php errors as well as looking in for in your browser's web console (cntrl + shift + k).
本文标签: custom post typesgutenberg message
版权声明:本文标题:custom post types - gutenberg message 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744760783a2623742.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论