Closed nhekkens closed 6 years ago
Did you change the permanent url?
Hey guys, no I'm not aware of anything that would have changed to cause this issue. You need to ensure that the REST API isn't disabled for your WP instance and then once you find the correct path for it (which shouldn't have changed) you can update that settings object to reflect the correct path. Is anyone aware of any changes to the core API that would be causing this?
I've googled around a bit and i believe its something to do with my MAMP Setup. However still dont have a solution :(
@EvanAgee where do i make sure i havent disabled it?
/?rest_route=/ Shows me
"/wp/v2": { "namespace": "wp/v2", "methods": [ "GET" ], "endpoints": [ { "methods": [ "GET" ], "args": { "namespace": { "required": false, "default": "wp/v2" }, "context": { "required": false, "default": "view" } } } ], "_links": { "self": "http://lewis.local/wp-json/wp/v2" } },
Going to "self": "http://lewis.local/wp-json/wp/v2" gives me The requested URL /wp-json/wp/v2 was not found on this server.
Cant think of any other reason this is happening apart from my Apache setup?
Sorry guys just realised i didn't have AllowOverride All in my v-host, which meant that my htaccess file wasn't being read resulting in the 404. Thats now working.
Im no longer getting 404 console logs for the api requests. BUT im still getting console.log errors. ( I haven't changed any code )
vendor.js:54123 [Vue warn]: Error in render function: "TypeError: Cannot read property 'rendered' of undefined"
found in
--->
Fixed the issue.
Hi @nhekkens do you mind sharing how you fixed your issue? I'm running into the same. Kinda new to this. My local setup, using VVV, only shows the posts if I use the URL ?rest_route=/wp/v2/ int he browser instead of wp-json/wp/v2/
I also get the same error "rendered undefined" and would love to know how you fixed it.
thanks!
nvm, i fixed the issue by updating permalinks!
Hey,
So ive just downloaded the latest WP (4.9.5) and installed your theme, ran NPM install and npm run production.
Theme is working however i get 404 on all the api requests to wp-json/wp/v2/
I then changed it to ?rest_route=/wp/v2/ in app.js ( If i put that into the browser it returns JSON )
Unfortunately im still getting the same issue.
Am i missing something or is this due to a later version of WP?
Thanks