Cannot update the order weight using complex form widget

Created on 15 February 2019, over 6 years ago
Updated 29 December 2023, over 1 year ago

Update an inline form having custom entities.
Change the weight of the order of custom entities in the inline form.
Update or save the inline form.
Change in weight or order not reflecting

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇮🇳India kalpanajaiswal

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

  • 🇺🇸United States dcam

    This is a duplicate of 🐛 IEF complex widget: Re-ordering / weight sometimes not updated Needs work . Both issues have patches with widely different solutions. We need to figure out which one to implement (if any). Both patches need tests. The less desirable solution's issue needs to be closed after granting credit to all contributors in the other issue.

    For what it's worth, I think that this is the patch we use on my sites, but I'll have to verify that sometime when I'm at work.

    Also, if this doesn't cause regressions, then it may indicate that this code is unnecessary. And I'd rather remove unnecessary code than add the new code that's in the other issue's patch.

  • 🇺🇸United States dcam

    Just FYI, I tried to reproduce the issue so that I could write a test, but I couldn't make it happen. And yet I know that we've had this problem at work. I have actually seen this problem in action. So if anyone can provide us with reliable steps to reproduce, then I'll volunteer to take care of writing a test.

  • 🇩🇪Germany geek-merlin Freiburg, Germany

    @dcam: Sounds very reasonable. Rock on!

  • 🇨🇿Czech Republic milos.kroulik

    This needs a patch for the 3.x branch.

  • Merge request !124Update InlineEntityFormComplex.php → (Open) created by milos.kroulik
  • 🇨🇿Czech Republic milos.kroulik

    The MR should contain the same change as https://www.drupal.org/project/inline_entity_form/issues/3033241#comment... 🐛 Cannot update the order weight using complex form widget Needs work

  • Pipeline finished with Success
    9 months ago
    Total: 714s
    #346156
  • 🇨🇴Colombia jlockhart Nomadic: Colombia

    Our use case has shown up again on a new D10 site we have.
    We have a Block as the parent block.
    We have other Blocks as child blocks as entity reference revisions fields.
    We use the Inline Entity Form - Complex to allow adding/editing the blocks in the block.
    When you Edit the Parent block and do nothing other than reorder the child blocks and save.
    The order is not updated.
    You have to actually make a change to the child blocks in order to get it to see you made a change.

    The patch (from MR) applies clean, and fixes the issue.
    Now when I reorder the items without making any other change the new order is saved.

Production build 0.71.5 2024