fix: Pass null post ID for local drafts in GutenbergKit#22580
Merged
jkmassel merged 1 commit intointegrate/gutenberg-preloadingfrom Feb 10, 2026
Merged
fix: Pass null post ID for local drafts in GutenbergKit#22580jkmassel merged 1 commit intointegrate/gutenberg-preloadingfrom
jkmassel merged 1 commit intointegrate/gutenberg-preloadingfrom
Conversation
Local draft posts have remotePostId defaulting to 0, which was passed directly to GutenbergKit's setPostId(). GBK expects null for unsaved posts. Now check isLocalDraft and pass null instead.
|
Contributor
|
|
Contributor
|
|
Contributor
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
jkmassel
approved these changes
Feb 10, 2026
jkmassel
approved these changes
Feb 10, 2026
6b97022
into
integrate/gutenberg-preloading
23 of 29 checks passed
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.





Description
Local draft posts have
remotePostIddefaulting to0(Java'slongdefault), which was passed directly to GutenbergKit'ssetPostId(). GBK expectsnullfor unsaved posts, but was receiving0instead.This change checks
isLocalDraftand passesnulltosetPostId()for local drafts, ensuring the GBK webview correctly identifies new/unsaved posts.Testing instructions
Open a new draft post in GutenbergKit:
null(not0) in the GBK webviewOpen an existing published post in GutenbergKit:
null)