-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Closed
Copy link
Labels
REST API InteractionRelated to REST APIRelated to REST API[Block] NavigationAffects the Navigation BlockAffects the Navigation Block[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
The Navigation block is making a request to /wp/v2/block-navigation-areas.
gutenberg/packages/block-library/src/navigation/edit/index.js
Lines 112 to 117 in 2655693
| const [ areaMenu, setAreaMenu ] = useEntityProp( | |
| 'root', | |
| 'navigationArea', | |
| 'navigation', | |
| navigationArea | |
| ); |
This won't work when the block is used in WP 5.9 without the Gutenberg plugin active as that REST API endpoint does not exist.
Step-by-step reproduction instructions
- Run the latest WP 5.9 trunk with no Gutenberg plugin active.
- Open the site editor.
- Insert a Navigation block if there isn't already one on the page.
- Open DevTools and look in the console.
- You'll see a 404 error from a request to
/wp/v2/block-navigation-areas.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Metadata
Metadata
Assignees
Labels
REST API InteractionRelated to REST APIRelated to REST API[Block] NavigationAffects the Navigation BlockAffects the Navigation Block[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended