Allow themes to alter inline entity forms

Created on 22 July 2021, about 3 years ago
Updated 22 January 2024, 8 months ago

Problem/Motivation

Themes can alter forms (https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/lib/Drupal/C...), but they can't alter inline entity forms using.

Proposed resolution

Make it so that themes can also use hook_inline_entity_form_entity_form_alter() and hook_inline_entity_form_reference_form_alter().

✨ Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium rp7

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

Comments & Activities

Not all content is available!

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

  • First commit to issue fork.
  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡¦Ukraine podarok Ukraine

    tnx

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

  • Status changed to Needs review 10 months ago
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    Bulk reopen.

  • Status changed to RTBC 9 months ago
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    Review:
    - Regression risk? Very low, so can be committed without tests.
    - Why do some hooks also dispatch to themes, why others not?
    - hook_views_ui_display_tab_alterhas a good explanation:

        // In AJAX context, ViewUI::rebuildCurrentTab() returns this outside of form
        // context, so hook_form_view_edit_form_alter() is insufficient.
        // @todo remove this after
        //   https://www.drupal.org/project/drupal/issues/3087455 has been resolved.
        $this->moduleHandler->alter('views_ui_display_tab', $build, $view, $display_id);
        // Because themes can implement hook_form_FORM_ID_alter() and because this
        // is a workaround for hook_form_view_edit_form_alter() being insufficient,
        // also invoke this on themes.
        // @todo remove this after
        //   https://www.drupal.org/project/drupal/issues/3087455 has been resolved.
        $this->themeManager->alter('views_ui_display_tab', $build, $view, $display_id);
    
    

    - Does this need an update in ief.api-php?
    - Yes, will do that on commit.

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

    Also added a Change record for the new constructor argument, just to be sure:
    https://www.drupal.org/node/3413055 β†’

  • Status changed to Fixed 9 months ago
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    Done.

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

    So you're still adding new features to the 3.x branch, and therefore the 3.0.x series? I thought part of the problem with the 2.0.x branch is that it was ignoring semver. 3.0.x should really be only bug fixes and tasks at this point. We probably need a 3.0.x branch now, so we can backport stable-only changes there, and leave 3.x as "main", for new features towards the 3.1.x series.

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

    @dww: The problem with 2.x was missing QA making thousands to test rabbits. Not semver.

    Having said that, i'm split what the best semver policy is for the future. For now imho it's RC still.
    But as i said in the stable release issue, RC18 may be the last.

    Opened 🌱 Maintenance policy Active .

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

Production build 0.71.5 2024