Not working in maintenance mode

Created on 2 February 2024, 5 months ago
Updated 3 June 2024, 21 days ago

Reproduce:

1. Create CSS Injector
2. Flush caches, open page source and see the custom asset injector CSS loaded
3. Enable maintenance mode
4. Check page source, asset is not loaded

When in maintenance mode, there's new class created in the body `.maintenance-page` that we want to use with the asset injector.

Thanks

πŸ› Bug report
Status

Postponed: needs info

Version

2.19

Component

Code

Created by

πŸ‡±πŸ‡ΉLithuania vibrasphere

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @vibrasphere
  • Status changed to Fixed 5 months ago
  • πŸ‡ΊπŸ‡ΈUnited States pookmish
  • Status changed to Needs work 4 months ago
  • πŸ‡­πŸ‡°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
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8
    last update 4 months ago
    8 pass
  • Status changed to Needs review 4 months ago
  • πŸ‡­πŸ‡°Hong Kong hswong3i
  • πŸ‡ΊπŸ‡Έ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 21 days ago
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @hswong3i any further details here? Can we set this fixed again?

Production build 0.69.0 2024