Content Versioning: Builder (M2A) drawer shows published values instead of the version's changes

Open
#28,502 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@eldertek is already working on this.

Since Nov 20, 2026.

  • #28542 by @eldertek — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
full-stack

Research direction

Start by tracing the Builder (M2A) drawer’s block loading and form initialization, then inspect how the parent version delta’s blocks.update[].item and blocks.create[] values are applied. Compare that flow with reopening a block from a saved version and check the related O2M issues for context. Done means reopening updated and newly added blocks in a version shows their saved values.

Written by the indexing model from the issue text.

Description

Describe the Bug

In a content version, reopening a Builder (M2A) item shows its published values instead of the changes saved in the version.

Saving the version works. The delta holds the change, and reading the parent with ?version=<key> returns it. The drawer form is the only place it goes missing. No request fails and the console stays clean, so editors think their changes were lost.

When the block is reopened, the app requests it directly with GET /items/block_trust_bar/<id>. That request has no version parameter, which makes sense because the version belongs to the parent. The app then doesn't apply the block's entry from the parent's delta (blocks.update[].item) to the form, while the block list on the parent does show the new title.

A block added inside a version opens with an empty form for the same reason: it exists only in the delta, so the drawer has no row to load. One of our editors hit this after adding a block to a draft and saving it. The form was empty when someone else opened it.

Possibly related: #27423 (O2M child in a version, closed) and #13537 (reopened nested O2M item reverts, closed before versioning existed).

To Reproduce
  1. Create a pages collection with content versioning enabled and a Builder (M2A) field blocks (junction page_blocks) that allows a block_trust_bar collection with a title field.
  2. Create a page with one block_trust_bar block titled "Original title" and save it.
  3. Create a version with key draft on the page.
  4. In the version, open the block, change the title to "Edited title", confirm the drawer and save the version. The block list now shows the new title.
  5. Open the block again.

Expected: the drawer shows "Edited title".

Actual: the drawer shows "Original title".

The version delta after step 4 (trimmed):

{
  "blocks": {
    "create": [],
    "update": [
      {
        "id": "322b8487-9cd6-4e47-9646-8bb6f1764554",
        "collection": "block_trust_bar",
        "item": {
          "id": "5702c0e5-f271-4f37-80a1-79719047be1b",
          "title": "Edited title"
        }
      }
    ],
    "delete": []
  }
}

Read through the parent, the API returns the new value:

GET /items/pages/<page-id>?version=draft&fields=blocks.item:block_trust_bar.title
-> "Edited title"

The drawer's request returns the published value:

GET /items/block_trust_bar/5702c0e5-f271-4f37-80a1-79719047be1b
-> "Original title"
Directus Version

v12.6.0

Hosting Strategy

Self-Hosted (Docker Image)

Database

PostgreSQL 16 (postgis/postgis:16-master)

Dominant language
TypeScript
Stars
38.8k
Forks
5k
Avg merge
4d 23h
Merged PRs (30d)
72

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from directus/directus

All issues in directus/directus

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.