- Issue created by @catch
- Status changed to Needs work
7 months ago 4:43pm 11 September 2024 - π«π·France andypost
core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php:56: $container->get('user.name_validator'),
So the form using service from user module?!
- πΊπΈUnited States mglaman WI, USA
So the form using service from user module?!
It makes sense, the form is creating a user.
- πΊπΈUnited States mglaman WI, USA
I tried this with the drupal_cms trial install tests
1. The profile's hooks run, but
$install_state['profiles'][$profile])]
is not an extension object
2. It doesn't seem the like profile's tasks executed (no recipes installed) - π¬π§United Kingdom catch
The installer used to install user module along with system module right at the beginning, we removed that step, but it looks like we left this implicit dependency. Probably should duplicate the logic to the installer, or factor the validator out to system module or under /core somewhere.
- πΊπΈUnited States mglaman WI, USA
I think I see a problem: install_base_system calls drupal_install_system which sets the profile in core.extension. We need to setup the profile from this. Something like:
// base system has been installed else { $module_handler = \Drupal::moduleHandler(); $config = \Drupal::configFactory()->get('core.extension'); $profile = $config->get('profile'); throw new \RuntimeException("profile name: $profile"); if ($profile !== NULL) { $install_state['parameters']['profile'] = $profile; install_load_profile($install_state); if (isset($install_state['profile_info']['distribution']['install']['theme'])) { $install_state['theme'] = $install_state['profile_info']['distribution']['install']['theme']; } if ($profile && !$module_handler->moduleExists($profile)) { $module_handler->addProfile($profile, $install_state['profiles'][$profile]->getPath()); } } }
Or in
install_bootstrap_full
task, which just sets the request session - π«π·France andypost
Moreover to constraint the form using
UserInterface::USERNAME_MAX_LENGTH,
which can't be moved so user module should be loaded nearby system one - π«π·France andypost
@mglaman btw profile is loaded via
if (!$install_state['base_system_verified']) { $loaded = $install_state['profiles'][$profile]->load(); }
- π¬π§United Kingdom catch
Managed to get an existing config install to work via install.php with some help from @alexpott (I originally couldn't get it to work with HEAD, but once that worked it was easy to find a bug). However that doesn't seem to have fixed the test coverage yet.
- π¬π§United Kingdom alexpott πͺπΊπ
catch β credited alexpott β .