Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gatsby preview contentful] rich content text field in contentful not fetching new content in preview #14918

Closed
FLoppix opened this issue Jun 19, 2019 · 2 comments

Comments

@FLoppix
Copy link

FLoppix commented Jun 19, 2019

Description

I have set up the gatbsy preview with contentful. However if you have a rich text field in one of your content types the preview instance is not fetching the new content. The data change is recognized but I dont receive the full payload to render the new data. Instead of getting all the fields back, I am only receiving the ID of the rich content field that changed. Any chances that there is a fix for this?

  nodeType: "embedded-entry-block",
  content: [],
  data: {
    target: {
      sys: { id: "c17UPYbEdX8LLIh9fFxkEqQ", type: "Link", linkType: "Entry" }
    }
  }

Steps to reproduce

  • Set up a gatsby project with contentful and the gatsby preview.
  • Add a rich content text field to one of content types.
  • Modify the content and wait for the changes
  • Gatsby Preview will recognize the data changes and refetch
  • only the above payload is fetched and the new content is not available

Expected result

The whole content of the rich content text field should be refetched for rendering new content. Instead I expect something some like this:

nodeType: "embedded-entry-block",
  content: [],
  data: {
    target: {
      sys: {
        space: {
          // space values
        },
        id: "c17UPYbEdX8LLIh9fFxkEqQ",
        type: "Entry",
        createdAt: "2019-06-11T15:24:15.054Z",
        updatedAt: "2019-06-18T17:05:51.976Z",
        environment: {
          sys: { id: "master", type: "Link", linkType: "Environment" }
        },
        revision: 11,
        contentType: {
          sys: { type: "Link", linkType: "ContentType", id: "headline" }
        }
      },
      fields: {
        // HERE I expect all of my relevant new fields with the content
      }
    }
  }

Actual result

Only the above payload is fetched.

Environment

System:
OS: macOS 10.14.1
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.11.3 - /var/folders/kk/lc2p7gkd2h7_hsrl11g2wylc0000gn/T/yarn--1560960233949-0.6171038925942727/node
Yarn: 1.12.3 - /var/folders/kk/lc2p7gkd2h7_hsrl11g2wylc0000gn/T/yarn--1560960233949-0.6171038925942727/yarn
npm: 5.6.0 - ~/.nvm/versions/node/v8.11.3/bin/npm
Languages:
Python: 2.7.15 - /usr/local/bin/python
Browsers:
Chrome: 75.0.3770.100
Firefox: 60.5.0
Safari: 12.0.1
npmPackages:
gatsby: ^2.9.7 => 2.9.7
gatsby-image: ^2.0.34 => 2.1.4
gatsby-plugin-feed: ^2.1.0 => 2.2.3
gatsby-plugin-google-analytics: ^2.0.17 => 2.0.21
gatsby-plugin-i18n: ^1.0.1 => 1.0.1
gatsby-plugin-manifest: ^2.0.24 => 2.1.1
gatsby-plugin-offline: ^2.0.25 => 2.1.3
gatsby-plugin-react-helmet: ^3.0.11 => 3.0.12
gatsby-plugin-sharp: ^2.0.31 => 2.1.7
gatsby-plugin-styled-components: ^3.0.7 => 3.0.7
gatsby-plugin-typescript: ^2.0.11 => 2.0.15
gatsby-plugin-typography: ^2.2.10 => 2.2.13
gatsby-remark-copy-linked-files: ^2.0.11 => 2.0.13
gatsby-remark-images: ^2.0.6 => 2.0.6
gatsby-remark-prismjs: ^3.2.6 => 3.2.11
gatsby-remark-responsive-iframe: ^2.1.1 => 2.1.1
gatsby-remark-smartypants: ^2.0.9 => 2.0.9
gatsby-source-contentful: ^2.0.73 => 2.0.73
gatsby-source-filesystem: ^2.0.28 => 2.0.41
gatsby-transformer-remark: ^2.3.8 => 2.4.0
gatsby-transformer-sharp: ^2.1.17 => 2.1.21

@FLoppix
Copy link
Author

FLoppix commented Jun 20, 2019

Can be closed. Just saw there is already an issue on the contenful repo ! contentful/rich-text#94

@FLoppix FLoppix closed this as completed Jun 20, 2019
@DSchau
Copy link
Contributor

DSchau commented Jun 20, 2019

Thanks Felix! I'll create a reproduction to illustrate the severity of the issue upstream!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants