• Resolved maaikez

    (@maaikez)


    Hi,

    When I try to add multi elevation, I get the following error:

    Warning 1549: failed to load external entity

    Code is:
    [leaflet-map fitbounds]
    [elevation-track file="<url-to-gpx>"]
    [multielevation]

    This happens when I use the full url to the gpx and also the relative url.

    [elevation gpx="<url>" ... ]

    with exactly the same url does work.

    WordPress version: 6.7.2
    Extensions for leaflet map: 4.4.4
    Leaflet map: 3.4.1

Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Author hupe13

    (@hupe13)

    Do you have an URL to a test page?

    Thread Starter maaikez

    (@maaikez)

    I was testing with this page:
    https://travelwith.maai.ke/tourlanglauftourtje-drie-dagen-rond-sulebu/
    (see the last one)

    • This reply was modified 3 days, 14 hours ago by maaikez.
    Thread Starter maaikez

    (@maaikez)

    elevation-track file seems to have the same issue (example on the same page)

    Plugin Author hupe13

    (@hupe13)

    Try this: Put in your .htaccess:

    AddType application/gpx+xml gpx
    RewriteRule .*\.gpx$ – [L,T=application/gpx+xml]
    Thread Starter maaikez

    (@maaikez)

    Unfortunately, that does not work.
    I have this in my .htaccess now:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    AddType application/gpx+xml gpx
    RewriteRule .*\.gpx$ – [L,T=application/gpx+xml]

    # BEGIN WordPress
    # The directives (lines) between "BEGIN WordPress" and "END WordPress" are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    I also had the OSM plugin enabled, but I now disabled it. That didn’t help either.

    • This reply was modified 2 days, 16 hours ago by maaikez.
    Plugin Author hupe13

    (@hupe13)

    This was my last idea. I downloaded your gpx files and tested it all with your shortcodes. It works for me.

    But now you changed something, the gpx files are not found.

    What if you only create one map at a time on the page, will it work?

    Thread Starter maaikez

    (@maaikez)

    It even partly stops working when I add it.

    Plugin Author hupe13

    (@hupe13)

    AddType application/gpx+xml gpx
    RewriteRule .*\.gpx$ – [L,T=application/gpx+xml]

    That did not work, maybe you are not allowed to enter it. Ask your hoster to set the MIME type for gpx files to “application/gpx+xml”.

    Thread Starter maaikez

    (@maaikez)

    What do you mean that I am not allowed to do that?

    I can change the .htaccess file.

    • This reply was modified 2 days, 14 hours ago by maaikez.
    Thread Starter maaikez

    (@maaikez)

    One map on a page with elevation works, but not with multi elevation. Also not with one gpx.

    Thread Starter maaikez

    (@maaikez)

    https://travelwith.maai.ke/test-multi-elevation/

    [leaflet-map fitbounds]
    [elevation-track file="https://travelwith.maai.ke/wp-content/uploads/noorwegen/multiple_day_gpx/tourskien-2025-03-12_test2.gpx"]
    [multielevation]

    Elevation works in all posts, see for example here:
    https://travelwith.maai.ke/dag-3-van-slettningsbu-terug-naar-de-auto/

    • This reply was modified 2 days, 14 hours ago by maaikez.
    Plugin Author hupe13

    (@hupe13)

    What do you mean that I am not allowed to do that?

    I can change the .htaccess file.

    Yes, but whether this configuration has an effect may depend on the configuration of your server (hoster).

    Thread Starter maaikez

    (@maaikez)

    I understand, but at least it is doing something is it does not work after I add the changes to the .htaccess file. So not sure why it does not work.

    Thread Starter maaikez

    (@maaikez)

    I found a section on the admin panel of the hoster where I can change the .htaccess file. When changing it there, same result: some of the ‘elevation’ maps don’t work anymore as well.

    What I was thinking about: The site was first http, later I installed a certificate and changed it to https. The gpx that was added after also changing the website url to https:// in the wordpress settings gives a 404 error after adding the changes you requested to the htaccess file. Can it have something to do with http / https?
    I changed (almost) all http urls to https in the wordpress database as well.

    Would it help to reinstall the plugin for example?

    Plugin Author hupe13

    (@hupe13)

    Let’s summarize:

    • elevation works
    • leaflet-gpx works
    • multielevation does not work

    The simplexml_load_file php command can’t load the gpx file, reason 1549 etc. I made a test webpage and loaded your gpx file from your host with simplexml_load_file – works. I don’t find an unambiguous answer asking the internet. So I assume it is something with your php or hosters configuration. Can you ask your hosters support?

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