pantheon-systems / pantheon-mu-plugin

Pantheon's WordPress mu-plugin for all WordPress-based upstreams.
MIT License
9 stars 5 forks source link

[BUGS-8199] Everyone except Administrators maintenance mode breaks wp-admin #47

Open crobertwatson opened 6 months ago

crobertwatson commented 6 months ago

Problem:

When enabling "Everyone except Administrators" in the PAPC Maintenance Mode Settings on the Live site (and probably other environments), upon logging out and then accessing the wp-admin, the user sees "Briefly unavailable for scheduled maintenance. Check back in a minute."

Steps to Reproduce:

  1. Install PAPC and deploy to Live
  2. On Live, access wp-admin and go to Settings > Pantheon Page Cache
  3. Set the Default Max Age to 604800 (1 week) if not already set
  4. Under "Maintenance Mode", select "Everyone except Administrators"
  5. Click "Save Changes"
  6. Log out of wp-admin
  7. Access wp-admin again
  8. See message "Briefly unavailable for scheduled maintenance. Check back in a minute."

Since it happens on a Live site and .maintenance is not present in the wp root directory (and isn't delete-able if it were), the workaround to get back to "Disabled" maintenance mode is to run terminus wp -- $SITE.$ENV option delete pantheon-cache to disable that setting and regain access to wp-admin.

jazzsequence commented 6 months ago

Tracking internally as BUGS-8199