Skip to content

Publishing a draft Container does not recursively publish nested drafts #423

@dwong2708

Description

@dwong2708

Nested Drafts Are Not Fully Published

Description

When attempting to publish a draft Section that contains nested draft Subsections and Units, the UI displays a warning indicating that all child objects (Subsections and Units) will also be published.

However, this is not the current behavior — only one level of children is actually published in the database. Deeper nested drafts (e.g., Units within Subsections) remain unpublished.

🧩 Example Structure

Draft Section
└── Draft Subsection
└── Draft Unit

🧪 Steps to Reproduce

  1. Create a draft Section with a nested Subsection and Unit, all in draft state.
  2. Attempt to publish the Section.
  3. Observe the UI warning that suggests all child objects will be published.
  4. After publishing, check the state of the Subsection and Unit.

💥 Actual Behavior

  • The Section and Subsection are published in database but in draft on mailisearch.
  • The Unit remain in draft status on the database and mailisearch.
  • The UI warning is misleading, since it suggests that all nested objects will be published.

✅ Expected Behavior

  • Publishing the Section should publish all nested draft children recursively, matching the UI’s warning and user expectation.

🧠 Notes

  • It appears that publish_from_drafts currently supports only one level of nested publishing.
  • The recursive publishing behavior may need to be implemented or extended.

⚠️ Impact

This issue affects the backup and restore feature at the moment of indexing published containers.

🔗 Related Work

A proposed solution is already under review:
#369

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions