- Issue created by @scott_euser
- Status changed to Closed: cannot reproduce
11 months ago 3:25pm 25 January 2024 - π¬π§United Kingdom scott_euser
This actually seems to be working fine. site_settings_update_10004() update hook sets this.
- Status changed to Needs work
11 months ago 7:46am 1 February 2024 - π¬π§United Kingdom scott_euser
Could be because you got it into a broken state already prior to the updb. Maybe try adding the plugin id to config and config import to manually work around it
- π¨π³China lawxen
@scott_euser Thanks for the advice, we has downgrade to 1.x with no error βΊοΈ
- π¬π§United Kingdom scott_euser
Would be better if we can get to the bottom of this though. Can you provide steps to reproduce from a clean install with 1.x then upgrading? When I try the updb hook seems to work fine.
- π¦πΉAustria roromedia Linz
I ran also into the same issue that
drush updb
did not run the update-hook as mentioned in this comment π Plugin not found exception when upgrading to 2x Needs work . As a quick remedy to fix a broken site you can re-run the update-hook via drush:
drush php-eval "\Drupal::moduleHandler()->loadInclude('site_settings', 'install'); site_settings_update_10004();"
Afterwards fllush the cache withdrush cr
and the site should be up and running again. - π¬π§United Kingdom scott_euser
Thanks for the tip: are you able to reproduce it eg from a backup? If so perhaps could check whether it needs to be change to a post update hook instead to account for particular scenarios?
- π¦πΉAustria roromedia Linz
Unfortunately I can't. We run Gitlab-pipelines where the system is always doing a
drush updb
on every run and after installing version 2.0 it did also run updb but it missed this update_hook it seems which left the site broken. Why I it did not run the update-hook I can't really tell. The upgrade was done with composer on Drupal 10.2.2 - maybe that helps to narrow it down? - Merge request !21Re-run update hook post config changes in case not yet set. This does no harm if set already β (Merged) created by scott_euser
- Status changed to Needs review
11 months ago 12:47pm 6 February 2024 - π¬π§United Kingdom scott_euser
Best I can think of is the updated Merge Request here to just re-run the update hook as a post update hook. Hopefully someone can give this a spin!
-
scott_euser β
committed 1b4d2c12 on 2.0.x
Issue #3416439: Plugin not found exception when upgrading to 2x
-
scott_euser β
committed 1b4d2c12 on 2.0.x
- Status changed to Fixed
10 months ago 5:54am 13 February 2024 - π¬π§United Kingdom scott_euser
Okay this doesn't hurt at least, so will merge and can always re-open or add a follow-up.
Automatically closed - issue fixed for 2 weeks with no activity.
- π§πͺBelgium baikho Antwerp, BE
This still doesn't work for me.
When I make changes and switch from
8.x-2.0
to2.0.0-alpha2
, I get:drush status Error: Class "Drupal\site_settings\SiteSettingsLoader" not found in Drupal\Component\DependencyInjection\Container->createService() (line 259 of /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php). [warning] Drush command terminated abnormally.
So I run cache clear to clear that error, but then subsequently I cannot run any drush command, incl.:
drush cr In DiscoveryTrait.php line 53: The "" plugin does not exist. Valid plugin IDs for Drupal\site_settings\SiteSettingsLoaderPluginManager are: flattened, full
Or the update hook as per #8:
drush php-eval "\Drupal::moduleHandler()->loadInclude('site_settings', 'install'); site_settings_update_10004();" In DiscoveryTrait.php line 53: The "" plugin does not exist. Valid plugin IDs for Drupal\site_settings\SiteSettingsLoaderPluginManager are: flattened, full
Or configuration set:
drush cset site_settings.config loader_plugin 'flattened' In DiscoveryTrait.php line 53: The "" plugin does not exist. Valid plugin IDs for Drupal\site_settings\SiteSettingsLoaderPluginManager are: flattened, full
It only works when I execute the above cmd ahead of checking out the
2.x
codebase.drush cset site_settings.config loader_plugin 'flattened' loader_plugin key does not exist in site_settings.config config. Do you want to create a new config key? (yes/no) [yes]: > yes
- π¬π§United Kingdom scott_euser
Can you try to 2.x-dev instead of the alpha release, few more commits haven't yet released in there.