最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

custom post types - gutenberg message

programmeradmin0浏览0评论

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';?

Share Improve this question asked Feb 6, 2020 at 19:21 bckelleybckelley 879 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

seems 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).

发布评论

评论列表(0)

  1. 暂无评论