wp-rest-polylang icon indicating copy to clipboard operation
wp-rest-polylang copied to clipboard

TypeError: Cannot read property 'id' of undefined

Open amiralikul opened this issue 6 years ago • 1 comments

adding this plugin to wordpress results in the following error.

ERROR #11321 PLUGIN

"gatsby-source-wordpress" threw an error while running the sourceNodes lifecycle:

Cannot read property 'id' of undefined

TypeError: Cannot read property 'id' of undefined

  • normalize.js:286 entity.polylang_translations___NODE.entity.polylang_translations.map.translat ion [gatsby_tutorials]/[gatsby-source-wordpress]/normalize.js:286:184

  • Array.map

  • normalize.js:286 entities.map.entity [gatsby_tutorials]/[gatsby-source-wordpress]/normalize.js:286:72

  • Array.map

  • normalize.js:284 Object.exports.mapPolylangTranslations.entities [as mapPolylangTranslations] [gatsby_tutorials]/[gatsby-source-wordpress]/normalize.js:284:56

  • gatsby-node.js:154 Object.exports.sourceNodes [gatsby_tutorials]/[gatsby-source-wordpress]/gatsby-node.js:154:24

success source and transform nodes - 19.647 s success building schema - 0.624 s

ERROR #85901 GRAPHQL

There was an error in your GraphQL query:

Cannot query field "allWordpressWpFrontpage" on type "Query".

File: gatsby-node.js:22:24

ERROR #85901 GRAPHQL

There was an error in your GraphQL query:

Cannot query field "allWordpressPage" on type "Query". Did you mean "allSitePage"?

File: gatsby-node.js:22:24

ERROR #85901 GRAPHQL

There was an error in your GraphQL query:

Cannot query field "allWordpressPost" on type "Query".

File: gatsby-node.js:22:24

ERROR #85901 GRAPHQL

There was an error in your GraphQL query:

Cannot query field "allWordpressWpNews" on type "Query".

File: gatsby-node.js:22:24

ERROR #85901 GRAPHQL

There was an error in your GraphQL query:

Cannot query field "allWordpressWpProjects" on type "Query".

File: gatsby-node.js:22:24

ERROR #85901 GRAPHQL

There was an error in your GraphQL query:

Cannot query field "allWordpressWpDirections" on type "Query".

File: gatsby-node.js:22:24

ERROR #11321 PLUGIN

"gatsby-node.js" threw an error while running the createPages lifecycle:

Cannot query field "allWordpressWpFrontpage" on type "Query".

GraphQL request:3:7 2 | { 3 | allWordpressWpFrontpage { | ^ 4 | edges {,Cannot query field "allWordpressPage" on type "Query". Did you mean "allSitePage"?

GraphQL request:14:7 13 | } 14 | allWordpressPage { | ^ 15 | edges {,Cannot query field "allWordpressPost" on type "Query".

GraphQL request:27:7 26 | } 27 | allWordpressPost { | ^ 28 | edges {,Cannot query field "allWordpressWpNews" on type "Query".

GraphQL request:42:7 41 | 42 | allWordpressWpNews { | ^ 43 | edges {,Cannot query field "allWordpressWpProjects" on type "Query".

GraphQL request:59:7 58 | } 59 | allWordpressWpProjects { | ^ 60 | edges {,Cannot query field "allWordpressWpDirections" on type "Query".

GraphQL request:77:7 76 | 77 | allWordpressWpDirections { | ^ 78 | edges {

Error: Cannot query field "allWordpressWpFrontpage" on type "Query". GraphQL request:3:7 2 | { 3 | allWordpressWpFrontpage { | ^ 4 | edges {,Cannot query field "allWordpressPage" on type "Query". Did you mean "allSite Page"? GraphQL request:14:7 13 | } 14 | allWordpressPage { | ^ 15 | edges {,Cannot query field "allWordpressPost" on type "Query". GraphQL request:27:7 26 | } 27 | allWordpressPost { | ^ 28 | edges {,Cannot query field "allWordpressWpNews" on type "Query". GraphQL request:42:7 41 | 42 | allWordpressWpNews { | ^ 43 | edges {,Cannot query field "allWordpressWpProjects" on type "Query". GraphQL request:59:7 58 | } 59 | allWordpressWpProjects { | ^ 60 | edges {,Cannot query field "allWordpressWpDirections" on type "Query". GraphQL request:77:7 76 | 77 | allWordpressWpDirections { | ^ 78 | edges {

  • gatsby-node.js:135 Object.exports.createPages D:/Code/gatsby_tutorials/gatsby-node.js:135:11

amiralikul avatar Oct 05 '19 14:10 amiralikul

This a bug in gatsby-source-wordpress. Was fixed in https://github.com/gatsbyjs/gatsby/pull/19331

tmo207 avatar Nov 07 '19 12:11 tmo207