You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Do custom blocks not get added to the block-renderer/ api endpoint by default? #12057
Subscribing to this. All of our blocks since WP 5.0.3 (that were using ServerSideRender) stopped working as the API is not registered.
On a side note, it gets a bit boring when you hear in August 2018 that there are no major changes to Gutenberg, join the boat, try to help the community just to hit the wall hard when the editor breaks backwards compatibility literally monthly 👎 #feelingLikeJoomla
I keep getting: GET /wp-json/wp/v2/block-renderer/library-plugin/frontpage-releases?context=edit&_locale=user 404 (Not Found) in the console and the request content I get is: {"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}}
@mrpritchett, I tried researching this and the most recent pull request I could find about block registration with regard to the API is in #13693 which appears to be the first step towards making all core, and optionally plugin, blocks discoverable on the server. I am new to JavaScript and block development. I think 13693 might be the most relevant because when I read the RFC I noticed two bullet points in the proposal which look like they might be relevant to your question:
Building REST APIs to fetch the available block types
Building REST APIs to fetch block objects from posts
The "References" and "Previous attempts" sections in the RFC talk about previous explorations and those also look interesting.
May I ask whether the information in #13693 answers your question?
Sorry, lost track of my own issue. For our team, the issue was where our custom webpack setup was enqueueing the files and partially where they were being compiled (at runtime). We played with settings and config and eventually got it to work just fine.
Activity
pojke commentedon Jan 15, 2019
Subscribing to this. All of our blocks since WP 5.0.3 (that were using ServerSideRender) stopped working as the API is not registered.
On a side note, it gets a bit boring when you hear in August 2018 that there are no major changes to Gutenberg, join the boat, try to help the community just to hit the wall hard when the editor breaks backwards compatibility literally monthly 👎 #feelingLikeJoomla
opensaurusrex commentedon Jan 18, 2019
I keep getting:
GET /wp-json/wp/v2/block-renderer/library-plugin/frontpage-releases?context=edit&_locale=user 404 (Not Found)in the console and the request content I get is:{"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}}designsimply commentedon Feb 12, 2019
@mrpritchett, I tried researching this and the most recent pull request I could find about block registration with regard to the API is in #13693 which appears to be the first step towards making all core, and optionally plugin, blocks discoverable on the server. I am new to JavaScript and block development. I think 13693 might be the most relevant because when I read the RFC I noticed two bullet points in the proposal which look like they might be relevant to your question:
The "References" and "Previous attempts" sections in the RFC talk about previous explorations and those also look interesting.
May I ask whether the information in #13693 answers your question?
mrpritchett commentedon Feb 17, 2019
Sorry, lost track of my own issue. For our team, the issue was where our custom webpack setup was enqueueing the files and partially where they were being compiled (at runtime). We played with settings and config and eventually got it to work just fine.
grappler commentedon Mar 19, 2019
Adding a note here because I came here via Google trying to figure out why I was getting a
rest_no_route.The reason for me was that
register_block_type()was only running whenis_admin()was true.opensaurusrex commentedon Mar 19, 2019
The issue I was having seemed to be fixed with WP 5.1, so now the dynamic blocks are working again.
shahalom commentedon Nov 24, 2019
The issue is still producing with wp-v5.3.x. I have mentioned detail code here ... https://stackoverflow.com/questions/59018433/serversiderender-components-producing-error-loading-block-no-route-was-found-m
Please add a detail note here so that many of us can read when google send us ... Thanks.
mrpritchett commentedon Nov 24, 2019
This ended up being a problem with where our custom blocks were hooked into, not an actual WP issue itself.
shahalom commentedon Nov 24, 2019
Thank you for the reply, I hope it is not an issue of WP itself now. My block hook is in the right place and still seeing the error!
leurdo commentedon Sep 14, 2020
saved my day!