Clean up problematic 2.x branch

Created on 14 November 2023, 11 months ago
Updated 11 December 2023, 10 months ago

Problem/Motivation

The 2.x branch and its commits violated semver and d.o rules, adding many unreviewed commits and regressions, causing mess and wasted resources.

This issue is about cleaning up the 2.x branch to bring it back inline with the work in the 1.x branch.

This issue is not about discussing accountability or governance impacts, please open other issues if needed.

Proposed resolution

- [X] Mark 2.x unsupported
- [X] Announce the cleanup on the project page
- [X] Create a 3.0.x branch to resume the 1.x work (so it is clear to people that they have to upgrade)
- [ ] Collect all 2.x commit issues
- [ ] Bulk assign all 2.x issues to 3.x
- [ ] Reopen issues committed to 2.x
- [ ] Finish the stable 1.x / now 3.0.x release

List of issues for more thorough review

- πŸ› Complex Widget selects wrong bundle when multiple bundles exist but user only has access to create one. Postponed: needs info
- ✨ New API hooks to react on inline entity save/delete Needs review
- πŸ› Translated entity should be used for the table presentation in the widget Needs review
- πŸ› Can't add more than two items with simple inline entity form widget under some circumstances Needs review
- ✨ Allow inline entity form submit handler to return the saved entity Needs review
- πŸ› Entity form simple weight duplicates Needs review
- πŸ› Wrong bundle form is displayed if user has permissions to create only one of the available bundles Fixed
- [#]
- [#]

List of issues to commit soon-ish

Approved (geek-merlin) in the process of cleanup.
- πŸ’¬ Quick Edit not working for Inline Entity Form - Complex Fixed
- πŸ› Using 'migrate' without 'migrate_plus' leads to fatal PHP error Fixed
- πŸ› Change type hints in inline_entity_form.api.php to align with Drupal core Fixed
- πŸ“Œ Drupal 10 Fixed
- πŸ› TypeError: krsort(): Argument #1 ($array) must be of type array, null given in krsort() Fixed
- πŸ“Œ Add label to weight select field for accessibility Fixed
- πŸ› Using 'migrate' without 'migrate_plus' leads to fatal PHP error Fixed
- πŸ› Memory allocation error Fixed
- ✨ Allow themes to alter inline entity forms Fixed
- πŸ“Œ Speed up FunctionalJavascriptTests tests Fixed

List of 1.x commite with no tag

# (tag: 2.0.0-rc8, tag: 2.0.0-rc6, origin/HEAD, origin/8.x-1.x, 8.x-1.x) Patch #9: let a user specify if her blog entries should be votable β†’ applied, Issue πŸ’¬ Quick Edit not working for Inline Entity Form - Complex Fixed

List of closed 2.x issues not mentioned in commit message, and not obvious regression fix

- πŸ› Using 'migrate' without 'migrate_plus' leads to fatal PHP error Fixed
- ✨ Pass context to canAddNew() and getCreateBundles() Needs review
- πŸ› Memory allocation error Fixed
- πŸ› Wrong bundle form is displayed if user has permissions to create only one of the available bundles Fixed
- πŸ› Wrong bundle form is displayed if user has permissions to create only one of the available bundles Fixed
- ✨ Allow themes to alter inline entity forms Fixed
- πŸ“Œ Speed up FunctionalJavascriptTests tests Fixed

List of 2.x commits

# Added the option to not open the default creation form for the required field
# fix: no need for core while we have info file
# docs: simple formatting
# Issue πŸ› Using 'migrate' without 'migrate_plus' leads to fatal PHP error Fixed by dsnopek, geek-merlin: Using 'migrate' without 'migrate_plus' leads to fatal PHP error
# Issue πŸ› Error: Call to a member function id() on boolean Postponed: needs info by mattjones86, Chris Matthews: Error: Call to a member function id() on boolean
# Issue πŸ› Complex Widget selects wrong bundle when multiple bundles exist but user only has access to create one. Postponed: needs info by rlmumford, Dinesh18: Complex Widget selects wrong bundle when multiple bundles exist but user only has access to create one
# Issue ✨ New API hooks to react on inline entity save/delete Needs review by JordiK, Odai Atieh: New API hooks to react on inline entity save/delete
# Issue πŸ› Change type hints in inline_entity_form.api.php to align with Drupal core Fixed by stefan.korn: Change type hints in inline_entity_form.api.php to align with Drupal core
# Reworked ComplexWidgetRevisionsTest
# Only visual changes
# Allow themes to implement the hook_inline_entity_form_entity_form_alter() and hook_inline_entity_form_reference_form_alter() hooks
# Issue πŸ› Fix integration with content moderation in multi-lingual scenarios Needs work by andreyjan, rp7, nicrodgers, texas-bronius: Fix integration with content moderation in multi-lingual scenarios
# Issue πŸ“Œ Ability to reference an entity and auto open its edit form Needs work by Charlie ChX Negyesi: Ability to reference an entity and auto open its edit form
# Issue πŸ“Œ Drupal 10 Fixed by chr.fritsch,podarok: Drupal 10 - rector and CodeSniffer
# Update src/Form/NodeInlineForm.php
# Issue πŸ› TypeError: krsort(): Argument #1 ($array) must be of type array, null given in krsort() Fixed by gauravjeet: TypeError: krsort(): Argument [#1] ($array) must be of type array, null given in krsort()
# Issue ✨ Allow hiding fieldset and title Needs work by Pancho, nevergone, ershov.andrey: Allow hiding fieldset and title
# (tag: 2.0.0-beta2, tag: 2.0.0-beta1) Issue ✨ Support for configuration entities Needs work by Spokje, Dylan Donkersgoed, attisan, DieterHolvoet, jienckebd, Suresh Prabhu Parkala, KapilV, dwkitchen: Support for configuration entities
# (tag: 2.0.0-beta3) Issue[#3257479]: Rerolled patch againist 2.0.x
# Added the option to not open the default creation form for the required field
# Resolved merge conflicts during rebase.
# Updated the changes from the previous commit.
# Updated the patch changes for 2.0.x branch
# Issue πŸ› Multiple duplicated messages while validating the inline entity form Needs work fix multiple errors while validating entity
# When we don't know what bundle to use when adding a new entity, instead of selecting the first one from the configured target bundles, limit it to only the first one of the user's ALLOWED bundles.
# (tag: 2.0.0-beta5) Issue πŸ› Translated entity should be used for the table presentation in the widget Needs review : Translated entity should be used for the table presentation in the widget
# Avoid memory limit error when checking for referenceable entities
# (tag: 2.0.0-beta6) Issue ✨ Auto-open inline entity forms (especially for cardinality: 1) Needs work by filsterjisah, bharath-kondeti, Anybody: Auto-open inline entity forms (especially for cardinality: 1)
# Issue πŸ› Can't add more than two items with simple inline entity form widget under some circumstances Needs review by AndyF, sanfair, Dylan Donkersgoed, andrei.vesterli, mlahde: Can't add more than two items with simple inline entity form widget under some circumstances
# Issue πŸ“Œ Add label to weight select field for accessibility Fixed by edmund.dunn, geek-merlin: Add label to weight select field for accessibility
# Issue ✨ Allow inline entity form submit handler to return the saved entity Needs review by jamiehollern, petar.gnjidic: Allow inline entity form submit handler to return the saved entity
# Issue πŸ› Entity form simple weight duplicates Needs review by tetranz, MorinLuc0, luizsgpetri: Entity form simple weight duplicates
# (tag: 2.0.0-beta7) Issue πŸ› D8: Multiple forms submit/cancel closes all child forms Needs work by paper boy, mrinalini9: D8: Multiple forms submit/cancel closes all child forms
# Patch #8 applied
# (tag: 2.0.0-beta8) fix: non needed suggestion
# Patch #2 Applied
# Patch #6 applied, Issue πŸ› Create/Update Labels buttons naming improvement Needs work
# Tried to fix test fail issue
# (tag: 2.0.0-rc2) Updated info.yml files according to modified deprecated code
# Removed deprecated code
# Patch #9 applied, Issue πŸ’¬ Quick Edit not working for Inline Entity Form - Complex Fixed
# Patch #4 applied, Issue πŸ› Notice: Undefined index: label in modules/contrib/inline_entity_form/inline_entity_form.module on line 345 Needs review
# (tag: 2.0.0-rc3) Patch #17 applied, Issue πŸ› Changes are not saved for some submit buttons Needs work
# Issue πŸ› IEF does not invoke hook_entity_prepare_form Fixed by ziomizar, eugene.brit, Musa.thomas: IEF does not invoke hook_entity_prepare_form
# Issue πŸ“Œ Fix the issues reported by phpcs Needs work by urvashi_vora, apaderno: Fix the issues reported by phpcs
# (tag: 2.0.0-rc4) Issue πŸ› IEF complex widget: Re-ordering / weight sometimes not updated Needs work by mmaldonado, R_H-L, StryKaizer, Rajab Natshah, geek-merlin, artemboiko: IEF complex widget: Re-ordering / weight sometimes not updated
# Issue ✨ Allow select widget for "Add existing items" Needs work by geek-merlin, arunkumark, Rithesh BK, almunnings, Goodmood, jennakoo, shivam_tiwari, the_glitch: Allow select widget for "Add existing items"
# Issue πŸ“Œ Add support for the menu entity. Needs work : add submodule "Inline Entity Menu Form"
# (tag: 2.0.0-rc5) lost dependency
# Fix: default settings
# (tag: 2.0.0-rc7) ✨ Add a FieldFormatter to display rendered menu Postponed : Add a new Field Formatter to display rendered menu
# (tag: 2.0.0-rc9) Issue πŸ“Œ Inline entity form menu not working properly Postponed : fix ajax inline_entity_menu_form
# Issue πŸ“Œ [Inline Entity Menu Form] Save is broken Downport : fix form alter
# Fixing existing label not using label overrides.
# Reuse labels instead.
# (tag: 2.0.0-rc10, origin/2.0.x) Issue ✨ Simple Widget - allow_new setting Fixed : Simple Widget - allow_new setting

πŸ“Œ Task
Status

Active

Version

1.0

Component

Miscellaneous

Created by

πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @geek-merlin
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany
  • πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA
  • πŸ‡ΊπŸ‡ΈUnited States corE

    You'll have to forgive me... I'm a little confused about whats happening.

    My D10 update says I have Inline Entity Form (Unsupported) 2.0.0-rc10 installed and recommends version 2.0.0-rc10 (Release notes https://www.drupal.org/project/inline_entity_form/releases/2.0.0-rc10 β†’ ). The version numbers are the same. I did the update as usual and nothing seemed to change, and the same recommended update information is still there. ??

    Also, I did not see a 2x option listed on the projects page ( https://www.drupal.org/project/inline_entity_form β†’ ), so I don't even know (or recall) how it came to be that I have this version installed. I recently migrated from D9 to D10 so I'm sure it was part of this processes somehow, and it may have been listed in D9 as reccomended. I did see the 2x versions listed on the 'View all releases' link https://www.drupal.org/project/inline_entity_form/releases β†’ . And I read something about a 3x release??

    The Project page (and link to issue) mentions cleaned up in πŸ“Œ Clean up problematic 2.x branch Active . So it seems there is a cleanup in the works but there isn't enough 'plain speak' instruction (for laymen like me 😊) as to whats going on to make this clear.

    I'm just wondering if I should:

    • ignore this update (from 2.0.0-rc10 to 2.0.0-rc10) and if there is a 2.0.0-rc11 on the horizon,
    • or if it will be a 3x version...
    • or if I should roll back to 8.x-1.0-rc15, or even uninstall??

    Please advise,
    Thank you.

  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    @corE You should go back to the 1.x branch.

  • πŸ‡¦πŸ‡ΊAustralia sime Melbourne

    Are there any downgrade/data implications of rolling back? I suspect some people running platforms will want to double check this.

  • πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA

    Logged an issue with GovCMS per #6: https://github.com/govCMS/GovCMS/issues/922

  • πŸ‡¦πŸ‡ΊAustralia pandaski

    We, from GovCMS, noticed that the 2.x branch is no longer supported starting from yesterday.

    Ideally, we would prefer a smooth transition from version 2.x to 3.x. We are willing to conduct tests and code reviews to make this transition as seamless as possible.

    Another option is to revert to the 1.x branch, but we have concerns about potential data issues that may arise from downgrading at this time.

    Our last option is to officially declare it as 'obsolete' in our distribution and patiently wait for version 3.x to be available.

  • πŸ‡§πŸ‡ͺBelgium jelle_s Antwerp, Belgium

    RE #5: Has this been tested? Is it possible to revert to 1.x without issues?

  • πŸ‡¦πŸ‡ΉAustria inst

    Hi,
    I tried to go back from the 2.x to the 1.x branch by changing this simply in the composer.json
    But it did not work. Nothing changes.

    How can I maange this downgrade!

    Thanks for any help.

  • πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA

    composer require drupal/inline_entity_form:^1 should do it.

  • πŸ‡¦πŸ‡ΉAustria inst

    Hi,
    not sure what the problem was before. Now I am able to go back to 1.x
    May be a update/cache/refresh.

    Anyhow - thanks for feedback!!

  • πŸ‡³πŸ‡ΏNew Zealand John Pitcairn

    Is it possible to mark the composer package for 2.x as unsupported? Anyone running composer require drupal/inline_entity_form is still going to get ^2.0@RC.

  • πŸ‡ΊπŸ‡ΈUnited States bsnodgrass

    Working on preparations to upgrade to 10.2.x I noticed inline_entity_form 2.x was unsupported.

    % lando composer why drupal/inline_entity_form
    drupal/recommended-project  dev-main  requires  drupal/inline_entity_form (^2.0@RC)

    Confirming, I was able to revert to use #8 to revert with no issues
    composer require drupal/inline_entity_form:^1

    Thanks for all your work.

  • πŸ‡ΊπŸ‡ΈUnited States alison

    We've been using 2.x releases for a while, so I'm inclined to just downgrade to 2.0.0-rc9, rather than to 1.x.

    But, I see others saying it went fine for them to go to 1.x (thank you for that!), I just feel anxious about it. Still thinking, just, sharing my "thinking out loud."

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    @geek-merlin: Not sure if this is the right spot to bring up issues which are possibly drawn by the branch confusion. But here my comment over there in ✨ Allow select widget for "Add existing items" Needs work if it helps:

    Regarding πŸ“Œ Clean up problematic 2.x branch Active we need to tackle issues possibly somewhat got under the mist of the latest branch confusions. And since this FR here has been hijacked for the now-closed 2.0 branch in the middle of its progress in 1.x, I do not know if it has ever landed in the 1.x branch. Let me link this issue to the clean up issue and let me set version back to 8.x-1.x-dev for a possible re-roll. Maintainers need to reopen if required.

  • πŸ‡¬πŸ‡§United Kingdom lexsoft London

    We have been utilizing the 2.x releases for quite some time, and our transition from 2.x to 1.x hinges on two critical features that the 2.x version provides:
    1. ✨ Auto-open inline entity forms (especially for cardinality: 1) Needs work : being the main reason for the switch
    2. ✨ Simple Widget - allow_new setting Fixed

    Furthermore, it has come to our attention that if additional submit buttons are introduced for the node, it becomes necessary to reinstate the inline_entity_form triggers. Here's an example of how to achieve this:

    if (\Drupal::moduleHandler()->moduleExists('inline_entity_form')) {
      array_unshift($form['actions']['save_edit']['#submit'],
        ['Drupal\inline_entity_form\ElementSubmit', 'trigger']);
      $form['actions']['save_edit']['#ief_submit_trigger'] = TRUE;
      $form['actions']['save_edit']['#ief_submit_trigger_all'] = TRUE;
    }
  • πŸ‡ΊπŸ‡ΈUnited States bsnodgrass

    Does it make sense to add a new issue to fix the Update Status report for this module? To change the recommended version to the version showing on the Project?

  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    OK, now i'm back at work here, coming from a lot of other urgent work.
    As many say, the sanest way out of this is a 3.x release.
    Moving on with this.

  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    I marked 3.x recommended, and both 1.x and 2.x supported for now, to not spread FUD.

  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    Also updated project page text (suggestions for improvement always appreciated!):

    Current version: 3.x

    A problematic 2.x branch has been released erroneously, containing multiple regressions and unreviewed commits. This is currently cleaned up in πŸ“Œ Clean up problematic 2.x branch Active . Help is appreciated.
    If you are on 1.x, you can safely upgrade to 3.x.
    If you are on 2.x, you can upgrade to 3.x, test well, and report back to πŸ“Œ Clarify how to upgrade IEF 2.x => 3.x Active .

  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany
  • πŸ‡ΊπŸ‡ΈUnited States bsnodgrass

    I attempted to upgrade to the 3.0.x recommended using
    my attempt failed composer why drupal/inline_entity_form

    reports drupal/recommended-project dev-main requires drupal/inline_entity_form (^1.0@RC)

    I am on core 10.2.0-rc1

  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    @bsnodgrass: Please open a separate issue with a detailed report what you typed and what you got.
    (What you should have done: `composer require drupal/inline_entity_form:^3`)

  • πŸ‡ΊπŸ‡ΈUnited States bsnodgrass
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    Thanks for that issue!

    Of course: People can only update to 3.x once ALL their projects that require IEF also allow 3.x. Sigh.

  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    Updated project page:

    Supported versions: 1.x / 3.x

    A problematic 2.x branch has been released erroneously, containing multiple regressions and unreviewed commits. This is currently cleaned up in πŸ“Œ Clean up problematic 2.x branch Active . Help is appreciated.

    If you are on 1.x, you can safely upgrade to 3.x, IF no other contrib module still requires 1.x only. In this case open an issue on that project, see πŸ“Œ Other projects should require drupal/inline_entity_form ^1 || ^3 Active .

    If you are on 2.x, you can either downgrade to 1.x, or upgrade to 3.x. Reporting back to πŸ“Œ Clarify how to upgrade IEF 2.x => 3.x Active is appreciated. (Note that the you WILL lose all the non-quality-assured features from 2.x. To any complainers: Feel free to write tests for your favorite feature, or maintain a fork with lower maintenance standard yourself.)

    Module authors, please update requirements

    See πŸ“Œ Other projects should require drupal/inline_entity_form ^1 || ^3 Active .

  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    I worked through each and every issue that was linked in a 2.x commit.

    Indeed most of them have been committed despite explicit needs-tests tags, but no tests.

    It's really a pity that this got such a code monster that it can only be handled with tests, that coding tests is not so popular as guessing some lines of php code, and that not much paid work is being pumped into this. But that's where we are.

  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    Did more archeology. There are some issues where the issue number is NOT in the commit message. So looking what closed issues are left with 2.x branch selected β†’ , and processing them too. Some of them are obviously fixes for regressions and fatal errors from previous commits, leaving them alone.

  • πŸ‡¦πŸ‡ΊAustralia sime Melbourne

    We noticed multiple issues when editing embedded entities using complex widget, these went away on 1.x branch. If you are on GovCMS PaaS but using the distribution you can do this for now but note that we are in pre-production so we have plenty of space to manage the risk of going back.

            "drupal/inline_entity_form": "1.x-dev as 2.0.0-rc9",
    
  • πŸ‡ΊπŸ‡¦Ukraine podarok Ukraine

    I(and a large group of agencies) was actively working on this module as well as YMCA Website Services Community

    All work will be moved to https://www.drupal.org/project/inline_entity_menu_form β†’ in Q1 2024
    Please, do not remove tags of 2.x branch just yet from current module in order to avoid breaking 500+ sites.

    Thank you and sorry for the inconvenience

Production build 0.71.5 2024