Skip to content

Conversation

@TylerBarnes
Copy link
Contributor

There's currently a bug where image cdn fields are not added to MediaItem nodes if those nodes are edited directly in WP - for example rotating or renaming an image. All incremental builds since the edit will fail with an image cdn error because on delta updates to MediaItems we weren't adding the right image cdn fields.

There's clearly some tech debt here as the createMediaItem function is only used for initial builds, not for delta updates. I don't want to make a large refactor in this PR though so I'm adding the image cdn fields in both places with a new addImageCDNFieldsToNode function.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 18, 2022
@TylerBarnes TylerBarnes requested review from veryspry and wardpeet May 18, 2022 01:17
@TylerBarnes TylerBarnes added topic: source-wordpress Related to Gatsby's integration with WordPress and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels May 18, 2022
@TylerBarnes
Copy link
Contributor Author

Canary available as [email protected]

Copy link
Contributor

@veryspry veryspry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

@TylerBarnes TylerBarnes merged commit 54832b4 into master May 18, 2022
@TylerBarnes TylerBarnes deleted the fix/wp-image-inc-builds branch May 18, 2022 19:15
LekoArts pushed a commit that referenced this pull request May 19, 2022
add image cdn fields on updates too

(cherry picked from commit 54832b4)
LekoArts pushed a commit that referenced this pull request May 19, 2022
@LekoArts
Copy link
Contributor

Successfully published:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: source-wordpress Related to Gatsby's integration with WordPress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants