Home Forums WordPress Plugins Hide My WP I'm not able to save settings. I'm getting fatal error!

This topic is: not resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21653
    perfectway
    Post count: 7

    Hi!

    I get this error every time I try to save settings from Hide my WP plugin.

    Fatal error: Uncaught Error: Call to undefined function get_home_path() in /home1/nextgates/public_html/business/wp-admin/includes/misc.php:204 Stack trace: #0 /home1/nextgates/public_html/business/wp-includes/class-wp-rewrite.php(1775): save_mod_rewrite_rules() #1 /home1/nextgates/public_html/business/wp-includes/class-wp-hook.php(286): WP_Rewrite->flush_rules(true) #2 /home1/nextgates/public_html/business/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #3 /home1/nextgates/public_html/business/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #4 /home1/nextgates/public_html/business/wp-settings.php(471): do_action('wp_loaded') #5 /home1/nextgates/public_html/business/wp-config.php(101): require_once('/home1/nextgate...') #6 /home1/nextgates/public_html/business/wp-load.php(37): require_once('/home1/nextgate...') #7 /home1/nextgates/public_html/business/wp-admin/admin.php(31): require_once('/home1/nextgate...') #8 /home1/nextgates/public_html/business/wp-admin/options.php(19): require_once('/h in /home1/nextgates/public_html/business/wp-admin/includes/misc.php on line 204

    Note that I have updated to the latest WordPress version + PLugins + PHP7.1
    Would you please help me!

    Regards,
    Anas

    • This topic was modified 7 years, 3 months ago by perfectway.
    • This topic was modified 7 years, 3 months ago by perfectway.
    • This topic was modified 7 years, 3 months ago by perfectway.
    #21658
    Suman M.
    Post count: 12480

    That’s a strange error as get_home_path() is core WP function. Please try adding the following code in your child theme’s functions.php file (right after if ( !function_exists( "get_home_path" ) ) {
    require_once( dirname(__FILE__) . "/../../../wp-admin/includes/file.php" );
    }

    • This reply was modified 7 years, 3 months ago by Suman M..
    • This reply was modified 7 years, 3 months ago by Suman M..
    #21733
    perfectway
    Post count: 7

    Thank you. It works after adding your code! Can you explain to me what is the problem, and is it okay to keep the code in the function file?

    Regards,
    Anas

    #21736
    Suman M.
    Post count: 12480

    Yes, there’s no problem at all in adding the above code in theme’s functions.php file.
    The issue is that HMWP is not able to access WP function get_home_path(). So, basically we are including the file/code that has get_home_path() function.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.