First step is not properly savable

Created on 1 October 2025, 3 months ago
Updated 19 November 2025, about 2 months ago

Problem/Motivation

While starting building a display, it is not possible to save the first step, we can do stuff, save all later steps, but if we come back to the first step, we still can't save it.

It may be because we do things like that:

  • In InstanceStorage::createFromImplementation(), we get the sources without the tree node Ids.
  • We create an HistoryStep, calculating the hash without the tree node ids
  • We create the entity, saving the source tree and this hash as the first step
  • Instance::postCreate() is adding the Node Ids with ::buildIndexFromSlot(), changing the hash of the present step but not the saved state which still have no tree node Ids.
  • Then we do a setSave() but it is not related to the issue (and must be kept)

Proposed resolution

Just a proposal, the root cause is not certain yet: Execute buildIndexFromSlot() in a preCreate() instead of postCreate(). Not an easy task because preCreate() is a static method.

🐛 Bug report
Status

Active

Version

1.0

Component

State Manager

Created by

🇫🇷France pdureau Paris

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024