Title: Loading .gpx doesn&#8217;t work
Last modified: November 27, 2020

---

# Loading .gpx doesn’t work

 *  Resolved [grandevil](https://wordpress.org/support/users/grandevil/)
 * (@grandevil)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/)
 * Hi, Joe thanks for the plugin. But loading gpx files doesn’t work. I can upload
   gpx files to my library. But when trying to load in the plugin. Nothing happens.
   I attach logs
 * `waymark-js.min.js?ver=0.9.14:9 Uncaught TypeError: t.trim is not a function
   
   at Waymark_Map_Editor.load_file_contents (waymark-js.min.js?ver=0.9.14:9) at 
   Object.success (waymark-js.min.js?ver=0.9.14:9) at i (load-scripts.php?c=1&load[
   chunk_0]=jquery-core,utils&ver=5.5.3:2) at Object.fireWith [as resolveWith] (
   load-scripts.php?c=1&load[chunk_0]=jquery-core,utils&ver=5.5.3:2) at x (load-
   scripts.php?c=1&load[chunk_0]=jquery-core,utils&ver=5.5.3:4) at XMLHttpRequest.
   c (load-scripts.php?c=1&load[chunk_0]=jquery-core,utils&ver=5.5.3:4) Waymark_Map_Editor.
   load_file_contents @ waymark-js.min.js?ver=0.9.14:9 success @ waymark-js.min.
   js?ver=0.9.14:9 i @ load-scripts.php?c=1&load[chunk_0]=jquery-core,utils&ver=
   5.5.3:2 fireWith @ load-scripts.php?c=1&load[chunk_0]=jquery-core,utils&ver=5.5.3:
   2 x @ load-scripts.php?c=1&load[chunk_0]=jquery-core,utils&ver=5.5.3:4 c @ load-
   scripts.php?c=1&load[chunk_0]=jquery-core,utils&ver=5.5.3:4 XMLHttpRequest.send(
   async) send @ load-scripts.php?c=1&load[chunk_0]=jquery-core,utils&ver=5.5.3:
   4 ajax @ load-scripts.php?c=1&load[chunk_0]=jquery-core,utils&ver=5.5.3:4 Waymark_Map_Editor.
   handle_file_upload @ waymark-js.min.js?ver=0.9.14:9 (anonymous) @ waymark-js.
   min.js?ver=0.9.14:9 dispatch @ load-scripts.php?c=1&load[chunk_0]=jquery-core,
   utils&ver=5.5.3:3 r.handle @ load-scripts.php?c=1&load[chunk_0]=jquery-core,utils&
   ver=5.5.3:3

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [Joe](https://wordpress.org/support/users/morehawes/)
 * (@morehawes)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13717971)
 * Hi [@grandevil](https://wordpress.org/support/users/grandevil/),
 * Thanks for reaching out and sorry to hear you are having this issue. Would it
   be possible for you to provide a link to the GPX file in question, so I can try
   it on my end?
 * Some other users have [reported](https://wordpress.org/support/topic/not-able-to-upload-gpx-file/)
   GPX upload issues, but if you are able to upload to your media library then that
   does not appear to be the issue.
 * Cheers,
 * Joe
 *  Thread Starter [grandevil](https://wordpress.org/support/users/grandevil/)
 * (@grandevil)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13718063)
 * Thank you for your prompt response. Any GPX file like
    [https://www.openstreetmap.org/trace/3514534/data](https://www.openstreetmap.org/trace/3514534/data)
 *  Plugin Author [Joe](https://wordpress.org/support/users/morehawes/)
 * (@morehawes)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13718224)
 * [@grandevil](https://wordpress.org/support/users/grandevil/),
 * Thanks for that, I had no issues with that GPX. I am unsure exactly what is creating
   the issue on your environment, this is new to me and a little tricky to diagnose
   without being able to replicate on my end.
 * Would you be able to install [this version](https://downloads.wordpress.org/plugin/waymark.0.9.14-upload_debug.zip)
   of the plugin? It should output some extra information to the console, which 
   _might_ help. Please can you provide me with the console output (you may need
   to “drill down” in the console so all information is displayed, as some may be
   hidden by default).
 * I appreciate anything you can provide. If you are having this problem them I’m
   sure others are, so it would be good to get to the bottom of it.
 * Thanks,
 * Joe
 *  Plugin Author [Joe](https://wordpress.org/support/users/morehawes/)
 * (@morehawes)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13718246)
 * I also meant to say that in order to install this version you will need to either
   [manually install it](https://wordpress.org/support/article/managing-plugins/#manual-plugin-installation),
   or use a [plugin](https://wordpress.org/plugins/reinstall-plugins/) that allows
   you to upload it through the WP Admin.
 * Joe
 *  Thread Starter [grandevil](https://wordpress.org/support/users/grandevil/)
 * (@grandevil)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13718290)
 *     ```
       Objectfile_contents: falsefile_info: {name: "3514534.gpx", type: "application/octet-stream", tmp_name: "/tmp/phpukVxbc", error: 0, size: 75693}file_type: "gpx"__proto__: Object
       waymark-js.min.js:9 Uncaught TypeError: t.trim is not a function
           at Waymark_Map_Editor.load_file_contents (waymark-js.min.js:9)
           at Object.success (waymark-js.min.js:9)
           at i (load-scripts.php:2)
           at Object.fireWith [as resolveWith] (load-scripts.php:2)
           at x (load-scripts.php:4)
           at XMLHttpRequest.c (load-scripts.php:4)
       ```
   
 * [Snapshot](https://romanroman.ru/wp-content/uploads/2020/11/Capture.jpg)
    -  This reply was modified 5 years, 6 months ago by [grandevil](https://wordpress.org/support/users/grandevil/).
 *  Thread Starter [grandevil](https://wordpress.org/support/users/grandevil/)
 * (@grandevil)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13718332)
 * By the way, if you upload the plugin to the open server (local), the plugin does
   not display half of the information at all. Build is clean, just installed
    [Snapshot](https://romanroman.ru/wp-content/uploads/2020/11/ad.jpg)
 *  Plugin Author [Joe](https://wordpress.org/support/users/morehawes/)
 * (@morehawes)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13718542)
 * Thanks for the information.
 * I can see that the file gets uploaded successfully, but when Waymark tries to
   read it (using the PHP [`file_get_contents()`](https://www.php.net/file_get_contents)
   function) an error occurs and instead of receiving the contents of the file, 
   it receives `false`.
 * Honestly this is going to be tricky to diagnose from my end, as it appears to
   be something with how your environment is configured. Another user suggested 
   using the Media Library to handle file uploads and hearing about your issue makes
   me think I should move this up on my to-do list.
 * Unfortunately this will require quite a bit of work, so I can not say when I 
   will be able to get this done. Sorry I can’t be of more help on this one.
 * > By the way, if you upload the plugin to the open server (local), the plugin
   > does not display half of the information at all. Build is clean, just installed
 * Very strange, I have not seen this one before either. Are you getting any PHP
   [errors](https://wordpress.org/support/article/debugging-in-wordpress/#wp_debug)?
 * Joe
 *  Plugin Author [Joe](https://wordpress.org/support/users/morehawes/)
 * (@morehawes)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13718545)
 * It might also be worth checking for errors in your HTML source.
 * Joe
 *  Thread Starter [grandevil](https://wordpress.org/support/users/grandevil/)
 * (@grandevil)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13718592)
 * > Very strange, I have not seen this one before either. Are you getting any PHP
   > errors?
 * Yes, error 404.
 * > Unfortunately this will require quite a bit of work, so I can not say when 
   > I will be able to get this done. Sorry I can’t be of more help on this one.
 * Thanks for the answer. It’s a pity, I really liked the demo, it just fits my 
   task. I will have to use a [stable plugin](https://wordpress.org/plugins/wp-gpx-maps/).
   But there is much less function.
    If it helps, I can give you access to my console.
   This is a new site, there is nothing on it yet. my email address [grandevil@mail.ru](https://wordpress.org/support/topic/loading-gpx-doesnt-work/grandevil@mail.ru?output_format=md)
 * With respect grandevil
    -  This reply was modified 5 years, 6 months ago by [grandevil](https://wordpress.org/support/users/grandevil/).
 *  Thread Starter [grandevil](https://wordpress.org/support/users/grandevil/)
 * (@grandevil)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13718639)
 * > Debug File Validation
   >  The file could not be uploaded to the server
 * .
    the plugin that you advised reports when loading any file, even .jpg. could
   it have something to do with it?
 *  Plugin Author [Joe](https://wordpress.org/support/users/morehawes/)
 * (@morehawes)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13718733)
 * Hi [@grandevil](https://wordpress.org/support/users/grandevil/),
 * Thanks for the offer. I’m going to hold off digging any deeper into the file 
   upload problem in favour of overhauling it to use the Media Library in the future.
 * This currently works for most users, but unfortunately with endless combinations
   of setups/environments it is almost impossible to write software that is completely
   bug free for everyone.
 * > Yes, error 404.
 * I’m not really following this issue. I can see from the screenshot that the page
   is partially loading, but not correctly. 404 is a HTTP error for “page not found”,
   so I am a little confused about how you are seeing that. It’s hard for me to 
   comment going on the information I have.
 * I’m sorry that the plugin does not function well for you. There is a reason it
   is still not version 1.0 yet! :0)
 * Cheers,
 * Joe
 *  Plugin Author [Joe](https://wordpress.org/support/users/morehawes/)
 * (@morehawes)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13794849)
 * Hi [@grandevil](https://wordpress.org/support/users/grandevil/),
 * I have spent some time on this and have created a version of the plugin which
   I’m hoping will fix this issue. You can download it [here](https://downloads.wordpress.org/plugin/waymark.0.9.16-a1.zip).
 * In order to install this version you will need to either [manually install it](https://wordpress.org/support/article/managing-plugins/#manual-plugin-installation),
   or use a [plugin](https://wordpress.org/plugins/reinstall-plugins/) that allows
   you to upload it through the WP Admin.
 * **I suggest backing up your install before activating development versions of
   the plugin!**
 * Once activated, please try to upload the file again through the Waymark Editor.
 * Additionally, I have created a new Setting (_Waymark Settings > Misc. > Editor
   Options > Media Library File Uploads_) which will enable the Media Library for
   file uploads. I would appreciate it if you could enable this and test out the
   file upload functionality again.
 * Let me know how that goes. If you are still having issues, please enable (_Waymark
   Settings > Misc. > Advanced > Debug Mode_) and provide any console output.
 * Cheers,
 * Joe

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Loading .gpx doesn’t work’ is closed to new replies.

 * ![](https://ps.w.org/waymark/assets/icon-256x256.png?rev=3491393)
 * [Waymark](https://wordpress.org/plugins/waymark/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/waymark/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/waymark/)
 * [Active Topics](https://wordpress.org/support/plugin/waymark/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/waymark/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/waymark/reviews/)

## Tags

 * [gpx](https://wordpress.org/support/topic-tag/gpx/)

 * 12 replies
 * 2 participants
 * Last reply from: [Joe](https://wordpress.org/support/users/morehawes/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/loading-gpx-doesnt-work/#post-13794849)
 * Status: resolved