Problem/Motivation
In InlineEntityFormBase::makeIefId, we have
return Crypt::hashBase64(implode('-', $parents));
This makes a hashed IEF ID.
This is used
1) as array index for storing entities: $form_state['inline_entity_form'][$iefId]['entities|delete']
2) as wrapper div id: "inline-entity-form-$iefId"
3) as action button name: "ief-$iefId-entity-edit-$key"
To save nested entities inside-out, it'd help if $iefId was NOT hashed, to make a lexicographic sort.
Proposed resolution
Remove hashing from InlineEntityFormBase::makeIefId.
This gets us longer HTML IDs, but this is no problem (no limit on HTML attributes), may be better for debugging anyway, and contrib may rely on this identity.
Draft CR:
The IEF ID used in $form_state and HTML IDs changed. As it was a meaningless hash before anyway, it's hard to imagine something breaks. Although this is now concatenated form parents, do not rely on this special form, as it may change anytime in the future.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork inline_entity_form-3203948
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
Comment #3
geek-merlinGreen, yay.
Comment #4
geek-merlin