Opened 6 years ago
Closed 6 years ago
#45263 closed defect (bug) (fixed)
The posts page is editable in the block editor
Reported by: | Chouby | Owned by: | |
---|---|---|---|
Milestone: | 5.0 | Priority: | normal |
Severity: | normal | Version: | 5.0 |
Component: | Editor | Keywords: | has-screenshots fixed-5.0 |
Focuses: | Cc: |
Description
WordPress used to remove the editor for the posts page thanks to:
if ( $post_ID == get_option( 'page_for_posts' ) && empty( $post->post_content ) ) { add_action( 'edit_form_after_title', '_wp_posts_page_notice' ); remove_post_type_support( $post_type, 'editor' ); }
in edit-form-advanced.php
.
This behavior is lost with the block editor in WP 5.0.
Attachments (1)
Change History (14)
This ticket was mentioned in Slack in #core-editor by desrosj. View the logs.
6 years ago
#4
follow-up:
↓ 13
@
6 years ago
- Keywords fixed-5.0 added; needs-patch removed
[43883] accidentally included the fix for this. 🙂
#5
@
6 years ago
Apparently it's still an issue, see https://github.com/WordPress/gutenberg/issues/11982
#6
@
6 years ago
@swissspidy: That's correct, the block editor currently doesn't support editing a post without the content area, so it has to fall back to the classic interface.
#7
@
6 years ago
@pento, I'm not seeing that this has been fixed. I'm running 5.0-RC1-43946, with Twenty Nineteen. Whether or not Gutenberg is active, the block editor loads for my blog/posts page, although the theme does not display anything added to the page content/blocks. There is no reversion to the classic interface.
#8
@
6 years ago
@littler.chicken can you provide more details on how to reproduce what you are seeing? What are you using for a testing environment?
I have tried the following:
- Blog page as draft.
- Blog page pubished.
- Plugin on.
- Plugin off.
- The same page assigned to Home Page and Blog Page (this shows a warning in the Reading Settings area, but appears to save).
#9
@
6 years ago
This is a local setup using PHP7.2, 5.0-RC1-43946, Twenty Nineteen, and no plugins active.
I have a static front page set, and then a page assigned to be the posts page (published). If I disable the static front page, but leave the posts page, the behavior is unchanged. If I activate Gutenberg, the posts page continues to load in the block editor.
With Gutenberg active, if I add the classic-editor
query string to the URL by hand, I get a modal asking me to confirm if I want to use the Classic Editor for content previously edited in Gutenberg. When I confirm, the redirect white screens with a JavaScript error:
Uncaught TypeError: Cannot read property 'then' of undefined at post.php?post=79&action=edit&classic-editor:1808
related to this script:
window._wpLoadBlockEditor.then( function() { wp.data.dispatch( 'core/edit-post' ).setAvailableMetaBoxesPerLocation( {"side":[],"normal":[],"advanced":[]} ); } );
If I deactivate Gutenberg and leave the query string in, the posts page loads in the block editor.
If I set the front page and the posts page to be the same, I get the warning on the Reading settings page, but the page continues to be editable in the block editor.
Thanks for the report, @Chouby