mglaman / wasm-drupal

Drupal in WASM
https://wasm-drupal.mglaman.dev/
MIT License
33 stars 6 forks source link

Install Drupal on demand instead of using a prepared SQLite database #8

Closed mglaman closed 2 months ago

mglaman commented 3 months ago

Right now Drupal is installed and a bundled SQLite database is included in the archive. We should see if Drupal can be installed as part of the launch.

However, this would also slow down the launch experience.

Blocked by (these are requirement warnings that get pushed in the installer UI.)

catch56 commented 3 months ago

This would allow people to enter their own admin password (and email address etc.) which is great. I was going to ask about this, but I think this issue is the fix for that.

I will ping you in slack about installer experience stuff.

mglaman commented 3 months ago

Patch to attach and try: https://www.drupal.org/project/drupal/issues/3416522

mglaman commented 2 months ago

Two concerns:

catch56 commented 2 months ago

Once project browser is in core, we'll want to remove the install profile step altogether, and replace it with a later step which is project browser.

It's also likely that Drupal CMS (or whatever the final name is) will ship with a mini-distribution that also removes the install profile step so that it can install recipes instead.

Either way I think that bit should be handled in the code base being installed, so I would leave the install profile selection and then it will 'just work' when there is a real Drupal CMS repo to point to instead of core.

mglaman commented 2 months ago

Getting an error in my PR #64

<br />
<b>Fatal error</b>:  Uncaught Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service &quot;file_system&quot;. in /persist/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php:992
Stack trace:
#0 /persist/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php(568): Symfony\Component\DependencyInjection\ContainerBuilder-&gt;getDefinition('file_system')
#1 /persist/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php(531): Symfony\Component\DependencyInjection\ContainerBuilder-&gt;doGet('file_system', 1)
#2 /persist/drupal/web/core/lib/Drupal.php(197): Symfony\Component\DependencyInjection\ContainerBuilder-&gt;get('file_system')
#3 /persist/drupal/web/core/modules/sqlite/src/Driver/Database/sqlite/Install/Tasks.php(79): Drupal::service('file_system')
#4 /persist/drupal/web/core/lib/Drupal/Core/Database/Install/Tasks.php(150): Drupal\sqlite\Driver\Database\sqlite\Install\Tasks-&gt;connect()
#5 /persist/drupal/web/core/includes/install.core.inc(1228): Drupal\Core\Database\Install\Tasks-&gt;runTasks()
#6 /persist/drupal/web/core/includes/install.core.inc(1177): install_database_errors(Array, './sites/default...')
#7 /persist/drupal/web/core/includes/install.core.inc(391): install_verify_database_settings('sites/default')
#8 /persist/drupal/web/core/includes/install.core.inc(119): install_begin_request(Object(Composer\Autoload\ClassLoader), Array)
#9 /persist/drupal/web/core/install.php(48): install_drupal(Object(Composer\Autoload\ClassLoader))
#10 {main}
  thrown in <b>/persist/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php</b> on line <b>992</b><br />
Screenshot 2024-07-24 at 9 00 01 AM

When reading install_begin_request, it sets up a minimal container, which does not have file_system defined. Then $install_state['database_verified'] = install_verify_database_settings($site_path); is invoked.

https://git.drupalcode.org/project/drupal/-/blob/11.x/core/includes/install.core.inc?ref_type=heads#L360

I haven't tried to reproduce outside of Wasm but seems like a bug in the installer

mglaman commented 2 months ago

Reproduced locally http://127.0.0.1:8080/core/install.php

I'll file a core issue

mglaman commented 2 months ago

https://www.drupal.org/project/drupal/issues/3463572

mglaman commented 2 months ago

https://git.drupalcode.org/project/drupal/-/merge_requests/8913