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

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

geek-merlin created an issue. See original summary.

geek-merlin’s picture

Status: Active » Fixed

Green, yay.

geek-merlin’s picture

  • geek-merlin committed 746a1e8 on 8.x-1.x
    Issue #3203948 by geek-merlin: Make $iefId unhashed to make it sortable
    

Status: Fixed » Closed (fixed)

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