Home › Forums › WordPress Plugins › Hide My WP › I'm not able to save settings. I'm getting fatal error!
- This topic has 3 replies, 2 voices, and was last updated 7 years, 2 months ago by
Suman M..
-
AuthorPosts
-
May 21, 2018 at 9:29 pm #21653
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.
May 22, 2018 at 5:50 am #21658That’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" );
}May 25, 2018 at 11:01 am #21733Thank 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,
AnasMay 25, 2018 at 11:20 am #21736Yes, 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. -
This topic was modified 7 years, 3 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.