Problem/Motivation

When installing a site from existing configuration, [notice] Field installation failed. is shown. This is because the module's install hook attempts to install the field even though field storage is not yet available.

Steps to reproduce

$ drush -y site:install minimal && \
    drush -y en domain_menu_access && \
    drush -y config:export && \
    drush -y site:install --existing-config

Proposed resolution

Domain itself has checks to see if config is syncing, and skipping adding the fields. Let's do the same here.

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

deviantintegral created an issue. See original summary.

deviantintegral’s picture

Assigned: deviantintegral » Unassigned
Status: Active » Needs review
tim-diels’s picture

Status: Needs review » Postponed (maintainer needs more info)

Hmm can not reproduce this anymore. Could you please test with the latest version from this module but also from domain to see if you can still reproduce this? The code change does look ok to me.

deviantintegral’s picture

Status: Postponed (maintainer needs more info) » Active

I can still reproduce this in Drupal 10.2.5 with both 2.0.0-rc1 and the latest dev releases of both domain menu access and domain. The above testing steps still work to show the notice.

tim-diels’s picture

Status: Active » Reviewed & tested by the community

Seems logical to me to add this but could not reproduce it to be honest. I fixed where the $text variable was outside the function somehow and follow more the domain_access logic.

tim-diels’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the report and work done, fixed.