Using twentyseventeen theme In static front page mode. Front page with panels: main page, page, one more page and blog page. Clicking edit link under blog page title allows to add story into it o_O
Google Chromium 62.0.3202.94 (Official Build) Built on Ubuntu , running on LinuxMint 18.2 (64-bit)
Expected editable title for blog page and editable permalink only like it done in core editor.
Currently I can add a story for the blog page which should not have any story itself.
Need handle for special pages like blog page or such.
Thanks for the report @infodiver.
Expected editable title for blog page and editable permalink only like it done in core editor.
Can you clarify what you mean by this? When I get to step 7, this is what I see:
I'm not sure what you mean by step 8 — "add some story in the blog page".
Oh, I think I know what you mean. When I open the "Blog" page in the classic editor, this is what I see:
Either Gutenberg or Twenty Seventeen should respect this existing behavior. I don't immediately know where the responsibility lies though.
Also have tested against Twenty Fifteen theme with the same result.
I came across the underlying logic in wp-admin/edit-form-advanced.php
today:
_This ticket was mentioned in Slack in #core-editor by jeffpaul. View the logs._
Pull request #8259 resolves this issue by adding a check for the posts page to the gutenberg_can_edit_post()
function as follows:
While this solves the issue, it does appear that there is a separate issue where all screen options are enabled anytime Gutenberg would have loaded but was prevented by this code.
Is this really something where we should be falling back to classic editor? Could we present the equivalent information in a Gutenberg context instead?
I don't think this is theme-specific. I've removed the associated interoperability label. Let me know if I'm wrong and it can be re-added.
@aduth We aren't really falling back to the classic editor... we are disabling the editor completely. Assuming someone is trying to edit the blog posts page and has content, they will be able to edit it in Gutenberg. However, if they have no content, the editor will be disabled completely, as it currently is in WordPress core.
Yes, but: Gutenberg is not just the content editor. Likening it to TinyMCE, in Classic editor when the editor is disabled, we simply don't initialize TinyMCE. In Gutenberg, we can do the same by displaying all of the chrome, but not initializing the Editor component.
That being said, apparently when a post type doesn't support 'editor'
, we fall back to the Classic editor. I don't think we should be doing this, but I imagine it was done this way as a point of convenience.
I'd be fine to do the same for posts page, but also think we should create a new separate issue to have better handling for the disabled editor (if one doesn't already exist).
@aduth Good point. I've created a new issue here: https://github.com/WordPress/gutenberg/issues/8321
Most helpful comment
I came across the underlying logic in
wp-admin/edit-form-advanced.php
today: