- Issue created by @vibrasphere
-
pookmish β
committed e9c6d068 on 8.x-2.x
Issue #3418928: Not working in maintenance mode
-
pookmish β
committed e9c6d068 on 8.x-2.x
- Status changed to Fixed
11 months ago 5:13am 4 February 2024 - Status changed to Needs work
11 months ago 9:20am 12 February 2024 - ππ°Hong Kong hswong3i
I get following error message once fetching the latest 8.x-2.x-dev:
NOTICE: PHP message: Uncaught PHP Exception TypeError: "Drupal\Core\Render\Renderer::addCacheableDependency(): Argument #1 ($elements) must be of type array, null given, called in /var/www/html/modules/contrib/asset_injector/asset_injector.module on line 153" at /var/www/html/core/lib/Drupal/Core/Render/Renderer.php line 768
After rolling back the patch, issue get fixed:
cd /var/www/html/modules/contrib/asset_injector curl -skL https://git.drupalcode.org/project/asset_injector/-/commit/e9c6d068752a7f152ee1d013e54eda2112daee35.patch | patch -p1 -R
- Merge request !14Revert "Issue #3418928: Not working in maintenance mode" β (Closed) created by hswong3i
- last update
11 months ago 8 pass - Status changed to Needs review
11 months ago 9:29am 12 February 2024 - πΊπΈUnited States pookmish
@hswong3i, This sounds like you have something else going on. In the 8.x-2.x version, line 153 is a comment and the only thing added in the commit was adding a hook_preprocess_maintenance_page which works exactly like it's supposed to when using a base installation. You should debug your code first.
- Status changed to Postponed: needs info
7 months ago 1:42pm 3 June 2024 - π©πͺGermany Anybody Porta Westfalica
@hswong3i any further details here? Can we set this fixed again?
- Status changed to Fixed
5 months ago 4:09pm 12 July 2024 - πΊπΈUnited States pookmish
I added a unit test for the maintenance mode page assets. It works as expected. @hswong3i, if your site is sending "null" into the hook_preprocess_maintenance_page then you have other things that are breaking the functionality. Even Drupal core expects an array in the hooks for claro and olivero themes.
Automatically closed - issue fixed for 2 weeks with no activity.