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

fix(plugin-nested-docs): publishing parent doc should not publish child doc #9958

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

JessChowdhury
Copy link
Member

Bug Fix

Issue

Draft children documents get overwritten when the parent document is published.

Fix

Correctly retrieve all documents, including drafts, during the resave process. Add test to ensure parent documents can be published without impacting the state of any children docs.

@JessChowdhury JessChowdhury force-pushed the fix/plugin-nested-docs-overwrite branch from 50b7e49 to 6404dd4 Compare December 13, 2024 16:34
@@ -136,5 +136,18 @@ describe('Nested Docs Plugin', () => {
// TODO: add back when error states are fixed
// await expect(parentSlugInChild).toHaveValue('/parent-slug-draft')
})

Copy link
Contributor

Choose a reason for hiding this comment

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

I would have probably used an int.spec. They tend to run faster and are easier to debug.

@DanRibbens DanRibbens merged commit 50e7c24 into main Dec 13, 2024
52 checks passed
@DanRibbens DanRibbens deleted the fix/plugin-nested-docs-overwrite branch December 13, 2024 17:04
Copy link
Contributor

🚀 This is included in version v3.7.0

@Collexi-Dev
Copy link

Collexi-Dev commented Dec 19, 2024

I think there is still an unexpected flow in the plugin for cascading changes to published children with pending drafts: #9437

Edit: Seems like I copied the incorrect issue, meant to mention this one: #10066

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

Successfully merging this pull request may close these issues.

3 participants