• Resolved Ravi B

    (@ravibee)


    When I activate maintenance mode in LightStart (running on Local), QueryMonitor reports the following error. However, the maintenance mode is active.

    Uncaught Error: Call to a member function get_author_permastruct() on null
    in C:\Users\ravib\Local Sites\ravibdinky\app\public\wp-includes\author-template.php on line 368

    Call stack:

    1. get_author_posts_url(1)
      wp-content/plugins/wp-optimize/cache/class-wpo-cache-rules.php:262
    2. WPO_Cache_Rules::purge_archive_pages_on_post_update(4727)
      wp-includes/class-wp-hook.php:326
    3. WP_Hook::apply_filters(NULL, array)
      wp-includes/class-wp-hook.php:348
    4. WP_Hook::do_action(array)
      wp-includes/plugin.php:517
    5. do_action('save_post', 4727, WP_Post, true)
      wp-includes/post.php:5284
    6. wp_publish_post(WP_Post)
      wp-content/plugins/wp-maintenance-mode/includes/classes/wp-maintenance-mode.php:105
    7. WP_Maintenance_Mode::__construct()
      wp-content/plugins/wp-maintenance-mode/includes/classes/wp-maintenance-mode.php:171
    8. WP_Maintenance_Mode::get_instance('')
      wp-includes/class-wp-hook.php:324
    9. WP_Hook::apply_filters(NULL, array)
      wp-includes/class-wp-hook.php:348
    10. WP_Hook::do_action(array)
      wp-includes/plugin.php:517
    11. do_action('plugins_loaded')
      wp-settings.php:578
    12. require_once('C:\Users\ravib\Local...blic\wp-settings.php')
      wp-config.php:103
    13. require_once('C:\Users\ravib\Local...public\wp-config.php')
      wp-load.php:50
    14. require_once('C:\Users\ravib\Local...p\public\wp-load.php')
      wp-admin/admin.php:35

    When I preview the Local site in incognito mode, the dedicated maintenance mode page (which uses a template with no header and no footer) displays, but shows the following PHP errors in the header and footer areas:

    Header:

    Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ‘;’ in Entity, line: 204 in C:\Users\ravib\Local Sites\ravibdinky\app\public\wp-content\plugins\wp-maintenance-mode\includes\classes\wp-maintenance-mode.php on line 1122

    Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ‘;’ in Entity, line: 205 in C:\Users\ravib\Local Sites\ravibdinky\app\public\wp-content\plugins\wp-maintenance-mode\includes\classes\wp-maintenance-mode.php on line 1122

    Footer:

    Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ‘;’ in Entity, line: 69 in C:\Users\ravib\Local Sites\ravibdinky\app\public\wp-content\plugins\wp-maintenance-mode\includes\classes\wp-maintenance-mode.php on line 1140

    Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ‘;’ in Entity, line: 70 in C:\Users\ravib\Local Sites\ravibdinky\app\public\wp-content\plugins\wp-maintenance-mode\includes\classes\wp-maintenance-mode.php on line 1140

    Deactivating maintenance mode doesn’t cause an error and makes the site display normally.

    • This topic was modified 9 months, 3 weeks ago by Ravi B.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Ravi B

    (@ravibee)

    Update:
    Although I still get the error when activating maintenance mode, I fixed the error shown when rendering the “Under maintenance” page by making it use a new template that only contains a Content block, with no Header or Footer.

    Plugin Support Kush

    (@kushnamdev)

    Hi there,

    Thanks for sharing the error details, I’m really sorry you’re having trouble with maintenance mode.

    At this stage, I’m unable to reliably reproduce the runtime error you’re experiencing. To help me get there, could you please provide a bit more information?

    1. Plugin version — Which version of the maintenance mode plugin are you running?
    2. WordPress version — Are you on the latest WP release?
    3. Activation context — Are you activating maintenance mode manually, via cron, or through a specific action (e.g., during deployment)?
    4. Server details — What PHP version and server environment are you using (Apache/Nginx, hosts like Cloudways, etc.)?
    5. Full error message — If you can, copy the complete error stack from your debug.log or server logs — it may offer clues.
    6. Steps to trigger it — Does it occur instantly on activation or only under certain conditions?

    With this info, I’ll test more accurately in an environment that matches yours and track down the cause more effectively.

    Thank you for your patience. I’m confident we’ll get this resolved together.

    Best regards,

    Thread Starter Ravi B

    (@ravibee)

    Hi Kush, here’s the information you requested:

    • Plugin version:  2.6.19
    • WP version: 6.8.2
    • Activation context: Manual
    • Server: nginx, Local Version 9.2.6+6872, PHP 8.2.23
    • Error messages: Pl. see my original post.
    • Steps to trigger: Manual activation from LightStart | General page.

    –Ravi

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Runtime errors activating maintenance mode’ is closed to new replies.