Home › Forum › Wp Gpx Maps › Support › Plugin version 1.5.02 causes Fatal error
- Questo topic ha 8 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 8 anni, 5 mesi fa da
ralph.
-
AutorePost
-
Nigel Fawcett
OspiteThe latest plugin update 1.5.02 results in the following Fatal error: Call to undefined function get_home_path() in /home5/mythand1/public_html/lunigianawending/wp-content/plugins/wp-gpx-maps/wp-gpx-maps_utils.php on line 67
Claudio
OspiteIt’s happening with me too. My blog’s posts wasn’t showing until I disable WP-GPX Maps 1.5.02.
Alex
OspiteYes, I had the same error on my site. Posts are completely destroyed and I received the “Fatal error: Call to undefined function get_home_path() in /home5/mythand1/public_html/lunigianawending/wp-content/plugins/wp-gpx-maps/wp-gpx-maps_utils.php on line 67”
not so good… :wacko:
woll-knaeuel
OspiteSame problem on my site, have to disable the plugin 🙁 please let my know when it is fixed
ralph
Ospite!!! bug – report !!!
v 15.02 blocks articles from loading correct, only the header image and title is left….
v 15.01 works fine.i’m running wp 4.9.4–de_DE
theme: rediziain Version: 1.0.37 ( fork of twenty fourteen )
on Apache/2.4.18 (Ubuntu) and php 7.0.25-0ubuntu0.16.04.1, mysql Version: ‘10.0.34-MariaDB-0ubuntu0.16.04.1pls fix.
best ralphMonica
OspiteIt’s calling a WordPress function to determine the location of the GPX files, and that is not working for some reason. I did what you’re not supposed to do, and something that probably doesn’t make a lot of sense, but it fixes the issue until the next version.
- Go to plugins/wp-gpx-maps/wp-gpx-maps_utils.php
- Find this:
function wp_gpx_maps_sitePath() { return substr(get_home_path(), 0, -1); } - Change to this:
function wp_gpx_maps_sitePath() { $home = set_url_scheme( get_option( 'home' ), 'http' ); $siteurl = set_url_scheme( get_option( 'siteurl' ), 'http' ); if ( ! empty( $home ) && 0 !== strcasecmp( $home, $siteurl ) ) { $wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */ $pos = strripos( str_replace( '\\', '/', $_SERVER['SCRIPT_FILENAME'] ), trailingslashit( $wp_path_rel_to_home ) ); $home_path = substr( $_SERVER['SCRIPT_FILENAME'], 0, $pos ); $home_path = trailingslashit( $home_path ); } else { $home_path = ABSPATH; } $home_path = str_replace( '\\', '/', $home_path ); return substr($home_path, 0, -1); }
All I did was copy the WordPress function out of wp-admin\includes\file.php into the plugin instead of allowing it to try to call the WordPress function. This is horrible coding but it shouldn’t introduce any issues until WordPress upgrades. Hopefully, the next version of this plugin actually fixes it. Use at your own risk.
Fabio
Ospitethx – but i rather wait for the next Version 🙂
After all – great plugin thx a lot! :good:
Cheers
Fabiomax
MembroHello guys, sorry for the inconvenience.. my website is working great..
can you simply addrequire_once(ABSPATH . ‘wp-admin/includes/file.php’);
at the top of the page?
ralph
Ospitehey,
thx for the fast fix!
up to 5+ stars againbest ralph
-
AutorePost