Support » Plugin: WP Maintenance Mode » Bot not working my site

  • Resolved jordanvickery28

    (@jordanvickery28)


    Hi,

    When I go to my site the bot doesn’t load automatically.

    Instead, it says there are unsafe scripts – if I click ‘load unsafe scripts’ then the bot works but my site goes from https to http.

    I have it configured to https in wordpress so not sure what the issue is?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author George J

    (@georgejipa)

    Hello @jordanvickery28,

    For a reason or another, your WordPress installation loads the settings file using HTTP instead of HTTPS. Without that file, the bot will never work.

    
    Loading failed for the <script> with source “<strong>http://</strong>{yourdomain}.com/wp-content/uploads/data.js?_=1567088640328”.
    

    Go to Settings > General and make sure WordPress Address & Site Address are identical.


    George

    Hi,

    Yes, they’re both identical and show https://jordanvickery.com

    Jordan

    Plugin Author George J

    (@georgejipa)

    @jordanvickery28 Try this workaround:

    1. Go to /wp-content/plugins/wp-maintenance-mode/includes/classes/
    2. Download and open wp-maintenance-mode.php
    3. Go to add_bot_extras method, and replace:

    $upload_dir = wp_upload_dir();

    with:

    
    $upload_dir = wp_upload_dir();
    
    // force HTTPS
    $upload_dir['baseurl'] = set_scheme_url($upload_dir['baseurl'], 'https');
    

    4. Reupload.

    • This reply was modified 4 months, 3 weeks ago by George J.
    • This reply was modified 4 months, 3 weeks ago by George J.
    • This reply was modified 4 months, 3 weeks ago by George J.

    Did that – now I’m getting 2 errors…

    Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/jordanvickery.com/public_html/wp-content/plugins/wp-maintenance-mode/includes/classes/wp-maintenance-mode.php:1) in /home/customer/www/jordanvickery.com/public_html/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher_Helper.php on line 78

    And

    Fatal error: Uncaught Error: Call to undefined function set_scheme_url() in /home/customer/www/jordanvickery.com/public_html/wp-content/plugins/wp-maintenance-mode/includes/classes/wp-maintenance-mode.php:648 Stack trace: #0 /home/customer/www/jordanvickery.com/public_html/wp-includes/class-wp-hook.php(286): WP_Maintenance_Mode->add_bot_extras(”) #1 /home/customer/www/jordanvickery.com/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array) #2 /home/customer/www/jordanvickery.com/public_html/wp-includes/plugin.php(465): WP_Hook->do_action(Array) #3 /home/customer/www/jordanvickery.com/public_html/wp-content/plugins/wp-maintenance-mode/views/maintenance.php(191): do_action(‘wpmm_before_scr…’) #4 /home/customer/www/jordanvickery.com/public_html/wp-content/plugins/wp-maintenance-mode/includes/classes/wp-maintenance-mode.php(628): include_once(‘/home/customer/…’) #5 /home/customer/www/jordanvickery.com/public_html/wp-includes/class-wp-hook.php(286): WP_Maintenance_Mode->init(”) #6 /home/custome in /home/customer/www/jordanvickery.com/public_html/wp-content/plugins/wp-maintenance-mode/includes/classes/wp-maintenance-mode.php on line 648

    Plugin Author George J

    (@georgejipa)

    @jordanvickery28 My bad, it should be:

    
    $upload_dir = wp_upload_dir();
    
    // force HTTPS
    $upload_dir['baseurl'] = set_url_scheme($upload_dir['baseurl'], 'https');
    

    Also, delete the cache after you make the change (if you have a cache plugin activated).

    • This reply was modified 4 months, 3 weeks ago by George J.

    That works now – thanks a lot!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.