Forum Replies Created

Viewing 15 replies - 31 through 45 (of 415 total)
  • Plugin Author tinuzz

    (@tinuzz)

    Hi,

    Can you give more information, for example, the actual error and possibly output from the JS console?

    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    Hi, 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.
    Plugin Author tinuzz

    (@tinuzz)

    It seems to me that you’re misunderstanding the purpose of Trackserver. What are you trying to accomplish by connecting the two?

    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    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:

    Let me know if you need any more help.

    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    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.
    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    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.

    Plugin Author tinuzz

    (@tinuzz)

    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.

    Plugin Author tinuzz

    (@tinuzz)

    Hi Alexander,

    Asking you for the track_base_url was 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/gettrack part 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 the index.php part, but the trackserver/gettrack part 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.

    Plugin Author tinuzz

    (@tinuzz)

    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.

    Plugin Author tinuzz

    (@tinuzz)

    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.

    Plugin Author tinuzz

    (@tinuzz)

    So.. 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.

    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    Can you disable the ab-simple-weather plugin and see if that helps? It seems to break the page.

    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    Thank you for your review! I’m happy you like Trackserver.

    Cheers,
    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    Maybe 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.

    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    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:

    https://wordpress.org/plugins/trackserver/#can%20trackserver%20support%20protocol%20x%20or%20device%20y%3F

    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.

Viewing 15 replies - 31 through 45 (of 415 total)