wp-graphql / wp-graphql-acf

WPGraphQL for Advanced Custom Fields
https://wpgraphql.com/acf
627 stars 123 forks source link

Copied ACF blocks output the same content in GraphQL, but not in WP #294

Closed upham-ui closed 3 years ago

upham-ui commented 3 years ago

Hi,

I've posted this in wp-graphql-gutenberg-acf as well, but since that plugin depends heavily on this one, I thought I would post here as well.

To replicate:

  1. Add an ACF block to a post, add some content, such as text in a text field, etc.
  2. Using the WP block editor toolbar "copy" feature, copy the block to another post.
  3. Change the block content in the new post.
  4. Go to the WP GraphQL IDE and query the new post's content (set content format to "RENDERED").
  5. The new post's ACF block content will be the same content as for the old post.

This is not true when displaying the blocks on the normal WP frontend. It is also not true if the GraphQL content format is set to "RAW" (but RAW is useless for Gatsby as it requires authentication).

ACF Pro had some issues with duplicated blocks mirroring each other's content that was fixed in version 5.10.2. I'm not sure if this is related. To be clear, this bug is for when blocks are copied, not duplicated.

Thanks, Ben

upham-ui commented 3 years ago

I don't think this is where the issue is, as the difference is occurring in the post content, which suggests its either an issue with graphql source wordpress or the graphql gutenberg plugin.