Skip to content

Can't restore a sub-doc as parent doc #2130

@virgile-dev

Description

@virgile-dev

Bug Report

Problematic behavior
If you delete a sub-doc then it's parent they both appear in the trash.
Restauring the subdoc doesn't work. The banner still appears after showing a success message.

Expected behavior/code
If you restore the child first it should become a parent doc.

Steps to Reproduce

  1. Create a doc and a sub-doc
  2. Then delete sub-doc
  3. Delete parent
  4. Go in trashbin see that sub-doc is not nested in parent
  5. Try and restore the child
  6. See success message but the red banner on top is not removed
  7. Try and refresh. The doc is not restaured
  8. Try and search for it it doesn't appear in the result.

Environment

  • Docs version: 4.8.3
  • Instance url: docs.numerique.gouv.fr

Possible Solution

Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.

Capture.video.du.2026-03-25.12-23-54.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions