question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cant hit Wordpress.com endpoint

See original GitHub issue

Description

Cant hit wordpress.com endpoint. The plugin seems to be designed to assume the self-hosted api by appending /wp/v2 to the end of each call. The Wordpress hosted api uses this format https://public-api.wordpress.com/wp/v2/sites/staticsitegeneration.wordpress.com

Steps to reproduce

Set up the Wordpress plugin as normal but try to use a wordpress.com hosted site instead of a self-hosted one. You can use my demo url that is above.

Expected result

The expected result is fetching the data.

Actual result

Fails in develop startup with: Error: Status 404 - https://public-api.wordpress.com/wp/v2/sites/staticsitegeneration.wordpress.com/wp/v2/types at WordPressSource.fetch (/Users/ayoung/experiments/gridsome/gridsome-wordpress-demo/node_modules/@gridsome/source-wordpress/index.js:171:15) at process._tickCallback (internal/process/next_tick.js:68:7)

Environment


Libs:
- gridsome version: 0.5.5
- @gridsome/cli version: 0.0.8


Browser:
- [ X ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:8
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
robaxelsencommented, Mar 23, 2019

@technoSpino thanks for looking into this, that is helpful!

@hjvedvik @tomtev: do we want to update the source plugin documentation to reflect this, and/or provide a config option (and implementation) for allowing both self-hosted and wordpress.com?

2reactions
rodrigorhascommented, Jul 18, 2019

I’ve fixed this bug updating the permalinks.

See this https://stackoverflow.com/questions/34670533/wordpress-rest-api-wp-api-404-error

Read more comments on GitHub >

github_iconTop Results From Across the Web

Empty “Endpoint API Caches” - WordPress.org
Hit the endpoints through a React frontend (intended use) and manually through the browser's address bar. Changed setting in the Settings tab: lowered...
Read more >
The Complete Guide to WordPress REST API Basics - Kinsta
The WordPress REST API is set to change the future of WordPress. Learn about the possibilities it offers and how to access it....
Read more >
How to Solve Common Browser Issues - WordPress.com
If you are experiencing problems displaying WordPress.com pages, clearing the browser cache is a good first step to try to resolve the issue....
Read more >
WordPress REST API: The Next Generation CMS Feature
Now that the initial content endpoints have been merged into all current versions of WordPress, plugin developers and theme authors can experiment with...
Read more >
WP REST API - Custom Endpoints - YouTube
In this video we are going to learn how to quickly create custom endpoints for our # WordPress #REST #API. WordPress default API...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found