-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Navigation Block: cannot "Add all pages" when directly editing a Template Part #29236
Copy link
Copy link
Closed
Closed
Copy link
Labels
[Block] NavigationAffects the Navigation BlockAffects the Navigation Block
Description
Description
Upon adding a Navigation Block while directly editing a Template Part (eg Appearance → Template Parts), clicking "Add all pages" will produce the error Error loading block: Invalid parameter(s): post_id
Note that the error does not appear directly in the full Site Editor, even when the Navigation Block is added to a Template Part within that context.
Step-by-step reproduction instructions
- Go to Appearance → Template Parts with a FSE-enabled theme active
- Create a new Template Part (or edit existing)
- Add a Navigation block (either horizontal or vertical)
- Click "Add all pages"
- Note the error
Error loading block: Invalid parameter(s): post_id
Expected behaviour
All pages added
Actual behaviour
Error
Screenshots or screen recording (optional)
Code snippet (optional)
The error happens in this REST API request:
/wp-json/wp/v2/block-renderer/core/page-list?context=edit&post_id=q%2F%2Ftemplate-part-5&_locale=user
That post_id looks fishy indeed. It's omitted in the Site Editor context.
WordPress information
- WordPress version: 5.6.2
- Gutenberg version: 10.0.1
- Are all plugins except Gutenberg deactivated? Yes
- Are you using a default theme (e.g. Twenty Twenty-One)? No
Device information
- Device: Desktop
- Operating system: macOS 11.2.1
- Browser: Chrome 88
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Block] NavigationAffects the Navigation BlockAffects the Navigation Block
Type
Fields
Give feedbackNo fields configured for issues without a type.
