Plugin Author
hupe13
(@hupe13)
Do you have an URL to a test page?
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]
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?
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”.
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.
One map on a page with elevation works, but not with multi elevation. Also not with one gpx.
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).
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.
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?