fix: guard null content when regenerating document hash on updateGraphqlDocument#3879
Merged
Merged
Conversation
…hqlDocument Extracted from #3784. On `updateGraphqlDocument`, callers may change the alias/description without re-sending `content` (e.g. editing from a settings panel). The previous code unconditionally hashed `$input['content']`, which crashed on a null/missing value. Now it falls back to the post's existing `post_content` (looked up from the input id) when `content` isn't a string, and only appends the normalized hash when there's actual string content to hash.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jasonbahl
added a commit
that referenced
this pull request
Jun 4, 2026
Sync main (split PRs #3877/#3878/#3879 + asset-pipeline #3880/#3882/#3883) into the IDE rebuild branch. Conflicts were all IDE release-metadata + the plugin header; resolved as: - package.json / wpgraphql-ide.php Version / readme.txt Stable tag: 4.5.0 (the release-please manifest value; release-please bumps to 5.0.0 at release — the in-repo version tracks the last release per the plugin's CLAUDE.md). - CHANGELOG.md / readme.txt changelog: union — keep the 5.0.0 notes AND main's released 4.5.0 entry. - Requires at least: 6.1 (not the 7.0 the branch had staged). WordPress 7.0's i18n features (.l10n.php 6.5, JIT textdomain 6.7) degrade gracefully and no runtime gate gates on 7.0, so there's no reason to lock out current installs. Dropped the "raised floor to 7.0" breaking-change note and aligned CLAUDE.md + i18n docs to 6.1. - Tested up to: 7.0 (WordPress 7.0 is released).
jasonbahl
added a commit
to josephfusco/wp-graphql
that referenced
this pull request
Jun 4, 2026
Sync main (split PRs wp-graphql#3877/wp-graphql#3878/wp-graphql#3879 + asset pipeline wp-graphql#3880/wp-graphql#3882/wp-graphql#3883) onto the IDE rebuild branch, on top of Joe's floor/CI commits (floor 6.1, WP 7.0 CI coverage + tested-up-to). Conflicts (all IDE release metadata) resolved as: - Version / Stable tag / package.json: 4.5.0 (release-please manifest value; release-please bumps to 5.0.0 at release — in-repo version tracks last release per the plugin's CLAUDE.md). - CHANGELOG.md / readme.txt changelog: union — keep the 5.0.0 notes AND main's released 4.5.0 entry. Dropped the now-inaccurate "raised floor to 7.0" breaking-change note (Joe set the floor to 6.1) and the 7.0-floor framing in the i18n docs. - Requires at least: 6.1 / Tested up to: 7.0 — kept Joe's values.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Prevents a crash in
Document::before_savewhen anupdateGraphqlDocumentmutation changes the alias/description without re-sendingcontent.Why
Extracted from #3784 so the bug fix lands as its own smart-cache patch, independent of the IDE major. The rebuilt IDE's Document Settings drawer edits alias/description without resending content, which surfaced this.
Fix
post_content(resolved from the input id) whencontentisn't a string.