Missing maintenance page

Created on 17 January 2025, 3 months ago

Problem/Motivation

When I enable maintenance mode on my website, anonymous users do not see the maintenance page.
I noticed that if maintenance mode is enabled, the `AnonymousLoginSubscriber` class is not called because the response is cached. Therefore, we need to clear the page cache when enabling maintenance mode.

Steps to reproduce

  1. Visit the site as an anonymous user.
  2. Log in using another browser and enable maintenance mode.
  3. Reload the page you visited in the first step (please ensure the URL does not point to the user/login path)

Result: You still see the login form.
Expected: You should see the maintaince page.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇭🇺Hungary segi

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

Merge Requests

Comments & Activities

  • Issue created by @segi
  • 🇮🇳India rajat.dkte

    Working on it.

  • Pipeline finished with Failed
    3 months ago
    Total: 150s
    #400587
  • Pipeline finished with Failed
    3 months ago
    Total: 162s
    #400646
  • Pipeline finished with Failed
    3 months ago
    Total: 149s
    #400664
  • Pipeline finished with Failed
    3 months ago
    Total: 155s
    #400671
  • Pipeline finished with Failed
    3 months ago
    Total: 197s
    #400743
  • Pipeline finished with Success
    3 months ago
    Total: 174s
    #400751
  • Pipeline finished with Success
    3 months ago
    Total: 143s
    #400768
  • Pipeline finished with Success
    3 months ago
    Total: 171s
    #400783
  • 🇮🇳India Kanchan Bhogade

    Hi
    I've tested MR !15 on Drupal 11.x
    Applied MR successfully...

    Testing Steps:
    Visit the site as an anonymous user.
    Log in using another browser and enable maintenance mode.
    Reload the page you visited in the first step (please ensure the URL does not point to the user/login path)

    Manual Test Result:After MR, The maintenance page is appears and not showing any path to login (/user/login )

    Attaching Screenshot
    Keeping in review for code verification

  • 🇮🇳India arunsahijpal

    Good work @rajat4u ,
    I tested this issue on my local and by applying the MR the issue is completely resolved as maintenance page is shown without clearing the cache.
    Attaching ss for reference.

    Hence moving it to RTBC.

    Thanks
    Arun

Production build 0.71.5 2024