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.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pdureau created an issue. See original summary.

pdureau’s picture

pdureau’s picture

Issue tags: +Novice
pdureau’s picture

smovs’s picture

Assigned: Unassigned » smovs

mogtofu33’s picture

Assigned: smovs » mogtofu33
Status: Active » Needs work

Checking what I can do for the tests.

mogtofu33’s picture

pdureau’s picture

pdureau changed the visibility of the branch 3549867-first-step-is to hidden.

mogtofu33’s picture

Status: Needs work » Needs review

  • mogtofu33 committed 804b8be8 on 1.0.x authored by smovs
    feat: #3549867 First step is not properly savable
    
    By: pdureau
    By: smovs...

mogtofu33 changed the visibility of the branch 3549867-first-step-is to active.

mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.