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.

gatsby-source-wordpress is not getting all CustomPostType's posts from WordPress

See original GitHub issue

Description

I’m using gatsby-source-wordpress in version 4.0.1. In my WordPress I’m using CustomPostTypes along with AdvancedCustomFields. I created CPT called MapPlace with ACF inside including Google Maps marker. I imported exactly 301 MapPlaces using WP All Import Pro. Because of the Google Maps marker inside, I had to add custom importing script which gets my place’s address and place pin on Google Maps field. Each post is being imported correctly. The problem occures when I’m fetching MapPlaces to my Gatsby project. As I said, I have exactly 301 published MapPlaces in my WordPress (pic rel). During the build gatsby-source-wordpress’ logs shows me that fetched 294 MapPlaces, and in my GraphiQL I see 286 real ones. image image image

Steps to reproduce

  • have big number (e.g. 301 as in my case) of CustomPostType’s posts with GoogleMaps pin field
  • try to query in Gatsby’s GraphiQL all these posts belonging to this particular CPT

Expected result

You get all these posts.

Actual result

You get less posts than it’s actually published

Environment

WordPress: wp-graphql version : image

Gatsby: "gatsby-source-wordpress": "4.0.1"

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Baartooocommented, Mar 3, 2021

@TylerBarnes We found where the problem was located! Post Types Order plugin was making mess in posts’ amount comming to Gatsby. If we turned this plugin off, we got all posts straight to Gatsby 😃 I write this here, cause someone could have similiar issue. Again, thanks for help anyway!

0reactions
TylerBarnescommented, Mar 3, 2021

Glad to hear you found it 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

[gatsby-source-wordpress] Cannot query custom-post-type
In gatsby v1 I was able to query custom-post-types from wordpress with gatsby-source-wordpress. The format in graphql was `wordpressWp[custom- ...
Read more >
gatsby-source-wordpress
Custom Post Types : it will work seamlessly, no further option needs to be activated. (“Show in REST API” setting needs to be...
Read more >
WordPress Custom Post Types in Gatsby | Casey James Perno
Today, let's take a look at getting a WordPress Custom Post Type to show up in our Gatsby's GraphQL queries. To connect WordPress...
Read more >
Gatsby fetching Wordpress Custom Post Types and create ...
I have a custom post type named project so i want to list all projects under the subpath like: expample.com/projects/ and dynamically create ......
Read more >
Using New Gatsby Source WordPress Plugin - CSS-Tricks
You can apply the same procedure to calling and creating pages, custom post types, custom fields, taxonomies, and all the fun and flexible ......
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