gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.27k stars 10.31k forks source link

[gatsby-source-wordpress] Category nodes are not being fetched #31947

Closed gustavo-a closed 3 years ago

gustavo-a commented 3 years ago

Description

Even though my site currently has 49 categories, whenever I start the dev server or run the build command I get this:

image

Then it ~obviously~ fails to create my category archive pages. I also checked it on the GraphiQL IDE in my Wordpress site and it is showing me all categories just fine.

I don't even know where to start debugging this, cause there is no apparent error.

Environment

My wordpress plugins are:

WP GraphQL - 1.4.0 WP Gatsby - 1.0.10 WPGraphQL CORS - 1.1.0 WPGraphQL for Advanced Custom Fields - 0.5.2 Add WPGraphQL SEO - 4.14.2 Yoast SEO - 16.5 Advanced Custom Fields - 5.9.6

  System:
    OS: Windows 10 10.0.19041
    CPU: (12) x64 AMD Ryzen 5 2600X Six-Core Processor            
  Binaries:
    Node: 12.18.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1023.0), Chromium (91.0.864.48)
  npmPackages:
    gatsby: ^3.4.0 => 3.7.2 
    gatsby-awesome-pagination: ^0.3.8 => 0.3.8 
    gatsby-plugin-advanced-sitemap: ^1.6.0 => 1.6.0 
    gatsby-plugin-breadcrumb: ^12.1.0 => 12.1.0 
    gatsby-plugin-emotion: ^6.2.0 => 6.2.0 
    gatsby-plugin-gatsby-cloud: ^2.2.0 => 2.2.0 
    gatsby-plugin-html-attributes: ^1.0.5 => 1.0.5 
    gatsby-plugin-image: ^1.3.0 => 1.3.0 
    gatsby-plugin-manifest: ^3.2.0 => 3.2.0 
    gatsby-plugin-next-seo: ^1.7.0 => 1.7.0 
    gatsby-plugin-nprogress: ^3.2.0 => 3.2.0 
    gatsby-plugin-offline: ^4.2.0 => 4.2.0 
    gatsby-plugin-postcss: ^4.2.0 => 4.2.0 
    gatsby-plugin-preload-link-crossorigin: ^1.0.2 => 1.0.2 
    gatsby-plugin-react-svg: ^3.0.0 => 3.0.0 
    gatsby-plugin-robots-txt: ^1.5.5 => 1.5.5 
    gatsby-plugin-sass: ^4.2.0 => 4.2.0 
    gatsby-plugin-sharp: ^3.2.0 => 3.2.0 
    gatsby-plugin-tsconfig-paths: ^1.0.2 => 1.0.2 
    gatsby-plugin-typescript: ^3.2.0 => 3.2.0 
    gatsby-source-filesystem: ^3.2.0 => 3.2.0 
    gatsby-source-wordpress: ^5.4.0 => 5.7.1 
    gatsby-transformer-sharp: ^3.2.0 => 3.2.0 
  npmGlobalPackages:
    gatsby-cli: 2.13.1
gustavo-a commented 3 years ago

Just found out that if I update a category while the development server is running I get this error:


TypeError: Cannot read property 'category' of undefined
    at fetchAndCreateSingleNode (D:\Projects\ultimatodobacon-old\ultimato-gatsby\node_modules\gatsby-source-wordpress\src\steps\source-nodes\update-nodes\wp-actions\update.js:73:24)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at wpActionUPDATE (D:\Projects\ultimatodobacon-old\ultimato-gatsby\node_modules\gatsby-source-wordpress\src\steps\source-nodes\update-nodes\wp-actions\update.js:288:20)
    at handleWpActions (D:\Projects\ultimatodobacon-old\ultimato-gatsby\node_modules\gatsby-source-wordpress\src\steps\source-nodes\update-nodes\wp-actions\index.js:59:7)
    at fetchAndRunWpActions (D:\Projects\ultimatodobacon-old\ultimato-gatsby\node_modules\gatsby-source-wordpress\src\steps\source-nodes\update-nodes\wp-actions\index.js:98:7)
    at fetchAndApplyNodeUpdates (D:\Projects\ultimatodobacon-old\ultimato-gatsby\node_modules\gatsby-source-wordpress\src\steps\source-nodes\update-nodes\fetch-node-updates.js:44:36)
    at sourceNodes (D:\Projects\ultimatodobacon-old\ultimato-gatsby\node_modules\gatsby-source-wordpress\src\steps\source-nodes\index.ts:61:5)
    at runSteps (D:\Projects\ultimatodobacon-old\ultimato-gatsby\node_modules\gatsby-source-wordpress\src\utils\run-steps.ts:41:9)
    at runAPI (D:\Projects\ultimatodobacon-old\ultimato-gatsby\node_modules\gatsby\src\utils\api-runner-node.js:429:16)

 ERROR #gatsby-source-wordpress_112003

I'm gonna investigate a little further, any help on what that means is very much appreciated. 😕

github-actions[bot] commented 3 years ago

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

github-actions[bot] commented 3 years ago

Hey again!

It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else. As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜