- Issue created by @joseph.olstad
- First commit to issue fork.
- π¨π¦Canada joseph.olstad
ok that helps, however now that there's no more drush exception, the website throws a WSOD and dblog didn't catch it, I had to go into the error.log to find this:
Got error 'PHP message: PHP Fatal error: Cannot redeclare Drupal\\layout_builder_st\\Element\\LayoutBuilder::layout() in /docroot/html/modules/contrib/layout_builder_st/src/Element/LayoutBuilder.php on line 74'
- π¨π¦Canada joseph.olstad
Ok this change makes no difference, I patched 2.0.x, still unable to rebuild cache with drush without a massive exception.
drush version: 13.3.3.0
php version 8.3.20β°β― $ cat !$
cat layout_builder_st.post_update.php/** * @file * Contains post-update hooks for layout_builder_st. */ declare(strict_types=1); /** * Rebuilds the container for updating layout_builder_st to v2.0.0. */ function layout_builder_st_rebuild_container_for_v2(): void { // Empty post-update hook to force a container rebuild. }
βββ β ryzen βΆ /docroot/html/modules/contrib/layout_builder_st βΆ π3 π10 π0 βΆ π 2.0.x βΆ
β°β― $ drush cr;
[error] TypeError: Drupal\layout_builder_st\DependencyInjection\ClassResolver::__construct(): Argument #1 ($decorated) must be of type Drupal\Core\DependencyInjection\ClassResolverInterface, Drupal\Core\DependencyInjection\Container given, called in /var/www/clients/client1/web1/web/docroot/html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\layout_builder_st\DependencyInjection\ClassResolver->__construct() (line 14 of /var/www/clients/client1/web1/web/docroot/html/modules/contrib/layout_builder_st/src/DependencyInjection/ClassResolver.php) #0 /var/www/clients/client1/web1/web/docroot/html/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\layout_builder_st\DependencyInjection\ClassResolver->__construct()
Only way past this is to truncate all cache tables.
once I truncate all cache tables, the site appears to work.
Surely there's a way to make this a lovely experience for everyone involved without having to truncate all cache_* tables manually?
- πΊπΈUnited States phenaproxima Massachusetts
Hmmm...well, the post-update has to run first, before the container is rebuilt. Did you do
drush updb
first? - π¨π¦Canada joseph.olstad
this magical function here:
function layout_builder_st_rebuild_container_for_v2(): void { // Empty post-update hook to force a container rebuild. }
what is this for_v2? This can't possibly be a hook, how would this ever get called? Is this part of a mystery API for core?
- πΊπΈUnited States phenaproxima Massachusetts
It's a post-update hook. They're run as part of normal database updates (update.php, or
drush updb
). The _for_v2 suffix is just the arbitrary name assigned to the hook, that's how they work: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension... - πΊπΈUnited States phenaproxima Massachusetts
You know...I just realized that I mis-named the hook. Let me push a correction there...
- πΊπΈUnited States phenaproxima Massachusetts
Adjusting credit, since you've been helping me test this out.
- π¨π¦Canada joseph.olstad
With the latest change, it comes through.
Thanks!
-
phenaproxima β
committed 68f690c8 on 2.0.x
Issue #3520833 by phenaproxima, joseph.olstad: add an empty post-update...
-
phenaproxima β
committed 68f690c8 on 2.0.x
- π¨π¦Canada joseph.olstad
Please tag an rc release or something.
alpha, beta or rc, any of the above would be good.
suggested tags:
2.0.0-alpha
2.0.0-beta
2.0.0-rc1I would suggest that this qualifies for at least a beta. This module is way past alpha stage.
Automatically closed - issue fixed for 2 weeks with no activity.