tinuzz
Forum Replies Created
-
Forum: Plugins
In reply to: [Trackserver] Classfied Listing plugin breaks trackserver live windowHi,
Can you give more information, for example, the actual error and possibly output from the JS console?
Martijn.
Forum: Plugins
In reply to: [Trackserver] Connecting wordpress & Traccar server with static IPHi, yes, that’s what I thought. That’s not what Trackserver does, and I’m curious what gave you the idea that it did…
Trackserver is about collecting location data and it stores it in its own database tables. It can only display tracks from there. So if you want to display data from Traccar, you have to export it there, and import it into Trackserver. Trackserver has no built-in functionality to do that, other than uploading GPX files or using the available APIs in other ways.
Martijn.
- This reply was modified 3 years ago by tinuzz.
Forum: Plugins
In reply to: [Trackserver] Connecting wordpress & Traccar server with static IPIt seems to me that you’re misunderstanding the purpose of Trackserver. What are you trying to accomplish by connecting the two?
Martijn.
Forum: Plugins
In reply to: [Trackserver] Live Tracker Set UpHi,
A complete step by step guide is big thing to ask. You haven’t said anything about what you have tried and what did and did not work the way you expected, so that makes it hard to help you.
Apparently, you have WordPress running, and you have Trackserver installed. So basically the next steps are:
- Have users install a live tracking app on their phones. The supported apps are listed on the plugin page (https://wordpress.org/plugins/trackserver/) and on the “Your profile” page in Trackserver itself.
- Configure the app for live tracking with Trackserver. Per-app instructions are in the “Your profile” page (“How to use …”).
- Start tracking. This should lead to tracks appearing in Trackserver (“Manage tracks”).
- Publish a map with one or more tracks with the
[tsmap]shortcode. The parameters of the shortcode are listed in the FAQ: https://wordpress.org/plugins/trackserver/#what%20are%20the%20available%20shortcode%20attributes%3F . For live tracking multiple users, you would generally use something like[tsmap user=username1,username2,username3]. Examples are here: https://www.grendelman.net/wp/trackserver-wordpress-plugin/.
Let me know if you need any more help.
Martijn.
Forum: Plugins
In reply to: [Trackserver] Parse error when trying to activate pluginHi,
It seems that this error occurs with PHP v7.2, but it does not on PHP v7.4 or newer. Can you upgrade? That would be a good thing in any case, since PHP 7.2 has been EOL for over two years, and 7.4 or greater is also recommended by WordPress itself.
Regards,
Martijn.
- This reply was modified 3 years, 3 months ago by tinuzz.
Forum: Plugins
In reply to: [Trackserver] Parse error when trying to activate pluginHi,
Few questions:
- Does it say in which file / line the error is?
- Which version of WP are you running?
- Which version of PHP?
Thanks,
Martijn.
Hi Alexander,
I’m not sure that’s a good idea. I would be more comfortable if you could provide me with some information. My current questions:
- Which version of WordPress are you on?
- Which webserver do you use?
- If Apache, can you send met the .htaccess file from WordPress’ document root, if it exists?
- Can you confirm that you have WordPress permalink structure set to ‘Plain’?
Thanks,
Martijn.
Hi Alexander,
Asking you for the
track_base_urlwas a bit silly, because after the change in the code, it was obviously not containing the ‘index.php’ anymore. But I don’t think it’s relevant.The problem with your WP instance, is that a URL like this:
http://.../index.php/trackserver/gettrack/?query=...&p=1600&....is redirected to
http://.../?page_id=1600&query=...&....So the essential
trackserver/gettrackpart of it disappears. That is why it isn’t working, but why the redirect is like that, I don’t know. In my own test setup, with permalinks disabled, there is also a redirect that removes theindex.phppart, but thetrackserver/gettrackpart is retained, and it works as it should.I’m not sure what to ask you at this point. I need a way to reproduce the problem, otherwise a fix will be hard to develop 🙁
Which web server are you using (Apache, Nginx, other)? Which version of WordPress are you on?
Regards, Martijn.
Hi,
Weird, the URL constuction mechanism in the backend is the same as in the frontend, so I don’t understand how one can work, and the other can not.
Can you do something for me? In the WP admin, go to the Manage Tracks page and open the HTML source (press CTRL-u). Then, find the line that starts with ‘
var track_base_url =‘, it should be somewhere near the bottom, and tell me the URL that’s in there? I’m mainly curious whether it contains ‘index.php‘ or not.In the mean time, I took a deeper dive into my own code and WP’s internal handling of rewrite rules and home URLs, and it kind of looks like I’m doing it the same way as WP itself is doing it, so I can’t quite figure out what it wrong just yet.
Your site seems to have some sort of custom rewrite rule, rewriting ‘/index.php?abc=xyz’ to ‘/?abc=xyz’, but that seems to mess up Trackserver’s URLs in the front-end. Can you tell me whether you have something custom in place that does this redirect?
Regards, Martijn.
Hi,
I looked at your page, and I think I see what is wrong.
Trackserver uses a method named ‘gettrack’ to get track data from the server, and to call that method, it constructs a URL based on the ‘home URL’ of the website. In your case, Trackserver assesses that the ‘gettrack’ lives at http://an.hamilton.lv/index.php/trackserver/gettrack/. However, that URL doesn’t work. It doesn’t serve that track data, but instead, it redirects to a different URL, that isn’t handled by Trackserver.
The problem appears to be the presence of the ‘index.php’ component in the URL. If I remove that, i.e. change it to http://an.hamilton.lv/trackserver/gettrack/, it seems to work fine.
It is likely that this is a bug in Trackserver, however one that does not trigger in my setup. I’ll have to evaluate the way Trackserver constructs the URL, because I think the logic there may be wrong.
Question: if you open the Tracks page in the WP backend and click in ‘View’ for a track, does it show then? I assume it doesn’t.
If you need a quick fix, you’ll have to edit the plugin file called ‘
class-trackserver.php‘. Go to line 253. It should read:$this->url_prefix = '/' . $wp_rewrite->index;Change it to:
$this->url_prefix = '';That should make it work for now. I’ll try and fix this the right way as soon as possible.
Regards,
Martijn.
Forum: Plugins
In reply to: [Trackserver] Map not showingSo.. it does work on a plain WordPress without any other plugins? The you should try and find out which plugin is blocking Trackserver from functioning.
In my tests on your website, the initizalization code for Trackserver does not get run, so there is something breaking the Javascript execution.
The colors of the start/endpoints are hardcoded, I’m afraid. You can change them in ‘trackserver.js’, but you’ll lose the changes when the plugin gets updated (which will happen sooner or later, I promise ;-))
I’m not sure what you’re asking with your question about the weather. My plugin has nothing to do with the weather.
Best regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] Map not showingHi,
Can you disable the ab-simple-weather plugin and see if that helps? It seems to break the page.
Martijn.
Forum: Reviews
In reply to: [Trackserver] Works PerfectlyThank you for your review! I’m happy you like Trackserver.
Cheers,
Martijn.Forum: Plugins
In reply to: [Trackserver] Hardware tracker with TrackserverMaybe this helps:
There is a system called Traccar, which supports hundreds of different GPS trackers, both software and hardware based.
Their list of supported devices is here: https://www.traccar.org/devices/
Presumably, all of these have the option to use a custom server, because Traccar is also meant to be self-hosted. If any of the hardware-based ones use HTTP for transport, I cannot tell you, unfortunately.
Martijn.
Forum: Plugins
In reply to: [Trackserver] Hardware tracker with TrackserverHi,
Thank you for using Trackserver.
Unfortunately, I do not know about any device that can do what you want. I have looked for them in the past, but eventually I gave up. That was a few years ago. At that time, I also wrote this:
So there may be devices that can report to a custom server, but if they don’t use HTTP as the transport protocol, it still wouldn’t work with Trackserver without any kind of middleware.
I am still interested in this topic, so if you manage to find an affordable device that can do this, please let me know!
Best regards,
Martijn.P.S. on a side note, you said you’ve modified Trackserver so it doesn’t show the underlying map, but I noticed that it still fetches map tiles from openstreetmap.org. It just doesn’t show them. I don’t know what you changed, of course, but wouldn’t it be easier to just change the tile server URL setting to point to a PNG of a white square? That way, no changes in Trackserver are necessary, and no map tiles would need to be fetched at all.