{ Dev Farm }

Web & Windows Development

Plugin version 1.5.02 causes Fatal error

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.
Stai visualizzando 9 post - dal 1 a 9 (di 9 totali)
  • Autore
    Post
  • #75807 Rispondi
    Nigel Fawcett
    Ospite

    The 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

    #75808 Rispondi
    Claudio
    Ospite

    It’s happening with me too. My blog’s posts wasn’t showing until I disable WP-GPX Maps 1.5.02.

    #75809 Rispondi
    Alex
    Ospite

    Yes, 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:

    #75810 Rispondi
    woll-knaeuel
    Ospite

    Same problem on my site, have to disable the plugin 🙁 please let my know when it is fixed

    #75813 Rispondi
    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.1

    pls fix.
    best ralph

    #75814 Rispondi
    Monica
    Ospite

    It’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.

    1. Go to plugins/wp-gpx-maps/wp-gpx-maps_utils.php
    2. Find this:
      function wp_gpx_maps_sitePath()
      	{
      		return substr(get_home_path(), 0, -1);
      	}
    3. 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.

    #75815 Rispondi
    Fabio
    Ospite

    thx – but i rather wait for the next Version 🙂

    After all – great plugin thx a lot! :good:

    Cheers
    Fabio

    #75816 Rispondi
    max
    Membro

    Hello guys, sorry for the inconvenience.. my website is working great..
    can you simply add

    require_once(ABSPATH . ‘wp-admin/includes/file.php’);

    at the top of the page?

    #75817 Rispondi
    ralph
    Ospite

    hey,
    thx for the fast fix!
    up to 5+ stars again

    best ralph

Stai visualizzando 9 post - dal 1 a 9 (di 9 totali)
Rispondi a: Risposta #75815 in Plugin version 1.5.02 causes Fatal error

You can use BBCodes to format your content.
Your account can't use Advanced BBCodes, they will be stripped before saving.

Le tue informazioni:




Non è possibile lasciare nuovi commenti.