Issue #3619711: Re-apply the user form display components the install profile overrides (3.0.x backport)

Closes #3619711

Backport of the production half of !454 (merged). The test-side changes are not included: the next-major lane only runs on 4.x, so the front page and menu block fixes are not needed here.

domain_install() and domain_access_install() place the domain fields on the user.user.default form display, and core hides configured fields by default, so that placement is what makes them visible. An install profile is installed after the modules it ships with (install_profile_modules() runs before install_install_profile()) and profile configuration overrides module configuration, so the profile's copy of that display replaces theirs and the fields end up in hidden. Both call sites bailed silently when the display was missing, so nothing was logged.

Any site installing domain alongside an install profile loses the domain administrator and domain access fields from the user form. This is not specific to Drupal 12; it was found there because core #3614825 made the test runner install modules through the profile path.

  • getFormDisplay() replaces the load plus is_null() bail.
  • hook_modules_installed() re-applies the components, guarded by InstallerKernel::installationAttempted() so it runs only during installation and never overrides an admin who hid a field afterwards.

Verified on 4.x by pipeline 939845: both phpunit lanes, both phpstan lanes and every lint job green.

Merge request reports

Loading
Loading