Title: tinuzz's Replies | WordPress.org

---

# tinuzz

  [  ](https://wordpress.org/support/users/tinuzz/)

 *   [Profile](https://wordpress.org/support/users/tinuzz/)
 *   [Topics Started](https://wordpress.org/support/users/tinuzz/topics/)
 *   [Replies Created](https://wordpress.org/support/users/tinuzz/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/tinuzz/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/tinuzz/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/tinuzz/engagements/)
 *   [Favorites](https://wordpress.org/support/users/tinuzz/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 415 total)

1 [2](https://wordpress.org/support/users/tinuzz/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/tinuzz/replies/page/3/?output_format=md)…
[26](https://wordpress.org/support/users/tinuzz/replies/page/26/?output_format=md)
[27](https://wordpress.org/support/users/tinuzz/replies/page/27/?output_format=md)
[28](https://wordpress.org/support/users/tinuzz/replies/page/28/?output_format=md)
[→](https://wordpress.org/support/users/tinuzz/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] RV Tracker](https://wordpress.org/support/topic/rv-tracker/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/rv-tracker/#post-18169268)
 * Hi [@beatus](https://wordpress.org/support/users/beatus/) , it wasn’t really 
   necessary to clone this question into a Github issue. This is not an issue with
   Trackserver.
 * As I wrote on Github, please check out the Trackserver Profile page for the basic
   answer to your question. For anything else, please refer to Trackserver’s source
   code.
 * Teltonika is telling you to write a script, using `gpsctl` to gather location
   data and using `curl` to send it to Trackserver. If you follow this advice, and
   use the URL format as it is listed on the Profile page, it will work. I cannot
   write that script for you, as I hope you will understand.
 * Best regards,
 * Martijn.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] RV Tracker](https://wordpress.org/support/topic/rv-tracker/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/rv-tracker/#post-18138490)
 * Hmmm.. It only just now occurred to me that these are POST requests, not GET.
   So the search for GPS data in the URI is futile, the data will of course be in
   the POST payload.
 * Unfortunately, that means, it can be ANYTHING, and there is no reason whatsoever
   to assume that Trackserver will understand this data and be compatible with it.
 * If the protocol isn’t documented anywhere, the only reason to make it work with
   Trackserver is to reverse engineer it. I.e. write a PHP script dat dumps the 
   POST data to a file, and then hope that the client actually sends the data in
   the first request….
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] RV Tracker](https://wordpress.org/support/topic/rv-tracker/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/rv-tracker/#post-18138359)
 * Regarding the errors (or rather: warnings)… you can safely ignore them for now,
   but if you don’t want to, then update the plugin by downloading a ZIP from Github
   and uploading it to WP:
 * [https://github.com/tinuzz/wp-plugin-trackserver/archive/refs/heads/master.zip](https://github.com/tinuzz/wp-plugin-trackserver/archive/refs/heads/master.zip)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] RV Tracker](https://wordpress.org/support/topic/rv-tracker/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/rv-tracker/#post-18138344)
 * Hi [@beatus](https://wordpress.org/support/users/beatus/) ,
 * I don’t see any location data in those requests….
 * Also strange is the alternation between 400 and 403 HTTP status codes. I assume
   that in ‘/ts/userid/password’, you replaced your actual user ID and your actual
   password, and those are not the literal URIs? And you changed your trackserver
   slug to ‘ts’ ?
 * Martijn.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] RV Tracker](https://wordpress.org/support/topic/rv-tracker/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/rv-tracker/#post-18137991)
 * Hi [@beatus](https://wordpress.org/support/users/beatus/) ,
 * All these deprecation errors have already been fixed in Git.
 * Regarding the problem with the empty tracks… I suspect that your router is sending
   the GPS data in a format that Trackserver doesn’t understand.
 * At first glance, it seems that the manual doesn’t say how it sends the data. 
   What I am talking about here, is the actual query parameters that contain the
   data. To see what I mean, go to your Trackserver Profile page, and look at the‘
   Online tracking web address’ for OsmAnd or the custom URL for GSPLogger or PhoneTrack.
 * Trackserver understands only specific URL parameters: ‘lat’, ‘lon’, ‘timestamp’
   are the most relevant ones. You should ask Teltonika how this works with your
   particular device, but what also would be a good idea is to look at the access
   log of your webserver after making sure that the full request (including query
   parameters) is logged. That will tell you exactly how your device is sending 
   the data. Please post back here if you have that.
 * If the device does not support OsmAnd-style URL placeholders, the only option
   is to change Trackserver to support your device.
 * Martijn.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] RV Tracker](https://wordpress.org/support/topic/rv-tracker/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/rv-tracker/#post-18128576)
 * Hi,
 * The ‘maxage’ attribute has a different purpose. It means ‘only show a track if
   it has been updated in the last X time’. It is meant to be used in a situation
   where you have a map that follows multiple users, but you only want it to show
   the users that have been active in the past X time. It then either shows the 
   whole track or it doesn’t. Maxage is not about track _points_.
 * Like I said, there is currently no way to display tracks partially (other than
   using geofences).
 * Your suggestions for track selection criteria are sane and I will surely implement
   something like this. I just can’t make any promises as to when it will be ready.
   I am currently slowly working towards the next release (probably 6.0) which will
   get some new features. I’ll do my best to give this some attention too.
 * Edit: forgot to say… using ‘live=y’ on an already live map (user=X) is not useful,
   you can leave it out.
 * Martijn.
    -  This reply was modified 1 year, 6 months ago by [tinuzz](https://wordpress.org/support/users/tinuzz/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] RV Tracker](https://wordpress.org/support/topic/rv-tracker/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/rv-tracker/#post-18124378)
 * Hi,
 * If you say ‘part of the route’, do you mean the part that is in the most recent
   track, and not older parts that are in other tracks? Because that would make 
   sense, that is is the way it is supposed to work.
 * Perhaps this will disappoint you, but there are only two ways to select tracks
   to display on the map:
    1. The latest one. This is what you are doing with ‘user=bluefire’.
    2. One or more arbitrary ones, chosen by their track ID. (‘track=x,y,z’).
 * There is no way to select tracks based on timestamps, description or other data.
   This is on the roadmap for a future version.
 * If you want to display your whole track by just using ‘user=bluefire’ (or ‘user
   =@’ if bluefire is also the user publishing the map), you can merge separate 
   tracks into one.
 * Best regards,
 * Martijn.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] Split and upload tracks](https://wordpress.org/support/topic/split-and-upload-tracks/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/split-and-upload-tracks/#post-18086059)
 * Hello Leo,
 * I did a quick test with a MySQL 8 server, and I think I found the problem. While
   the query is old-fashioned, made for MySQL < 8 and ready for replacement by something
   more modern, the _real_ problem is the use of a the keyword `row` as a colum 
   alias, which seems to work in MariaDB but not in MySQL.
 * So, the quickfix is to use `rownum` as the column alias rather than `row`.
 * In class-trackserver.php, can you replace this snippet on [lines 1357 and 1358](https://github.com/tinuzz/wp-plugin-trackserver/blob/v5.0.2/class-trackserver.php#L1357-L1358):
 *     ```wp-block-code
                   'SELECT @row := @row + 1 AS row, l.id FROM ' . $this->tbl_locations . ' l CROSS JOIN (select @row := -1) r WHERE l.trip_id=%d ORDER BY occurred' .
                   ') c WHERE c.row IN ' . $sql_in, $track_id );
       ```
   
 * by this:
 *     ```wp-block-code
                   'SELECT @row := @row + 1 AS rownum, l.id FROM ' . $this->tbl_locations . ' l CROSS JOIN (select @row := -1) r WHERE l.trip_id=%d ORDER BY occurred' .            ') c WHERE c.rownum IN ' . $sql_in, $track_id );
       ```
   
 * And see if it works?
 * The only actual changes are `AS row` to `AS rownum` in the first line, and `c.
   row` to `c.rownum` in the second.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] Split and upload tracks](https://wordpress.org/support/topic/split-and-upload-tracks/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/split-and-upload-tracks/#post-18085641)
 * The fact that the SQL query produces an error when you execute it outside WordPress
   is a clear indication that the problem is in the query itself, and it is not 
   related to (the version of) PHP.
 * This query has worked for me ever since I implemented it, also currently on latest
   MariaDB 10.x. But apparently it is not compatible with MySQL 8.
 * Since the query contains a workaround for functionality thas was not present 
   in MySQL back then, but has other solutions nowadays, I will try and see if I
   can change it into something that works on MySQL 8 as well as MariaDB.
 * Martijn.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] Strange conflict with OS DataHub Maps plugin](https://wordpress.org/support/topic/strange-conflict-with-os-datahub-maps-plugin/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/strange-conflict-with-os-datahub-maps-plugin/#post-18083057)
 * Well, if I find some time (not today, sorry), I’ll try to reproduce it myself
   and see if I find the cause. I can see how this is annoying, but unfortunately,
   the cause may be hard to find.
 * I see that when the first map is full screen, everything looks kind of normal
   if you look at how the browser represents the relevant elements, but it seems
   that the right events for downloading map tiles aren’t triggered. Rather than
   being a problem with the fullscreen control, this could well be a problem in 
   core Leaflet, although I really don’t see (like yourself) how this could only
   surface in the first map and not in the others.
 * You can always try to upgrade Leaflet in Trackserver to 1.9.4, just copy over
   the JS and CSS, and update [the version string in Trackserver](https://github.com/tinuzz/wp-plugin-trackserver/blob/master/class-trackserver.php#L23).
 * In fact, you could even replace Trackserver with [the development version from Github](https://github.com/tinuzz/wp-plugin-trackserver/archive/refs/heads/master.zip),
   which already includes Leaflet v1.9.4.
 * Hope this helps,
 * Martijn.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] Strange conflict with OS DataHub Maps plugin](https://wordpress.org/support/topic/strange-conflict-with-os-datahub-maps-plugin/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/strange-conflict-with-os-datahub-maps-plugin/#post-18083010)
 * Hm, that probably means that trackserver.js is loaded before OS Datahub’s javascript.
 * One more thing to try before I will try and find the time to reproduce the issue:
 * On [line 329 of class-trackserver.php](https://github.com/tinuzz/wp-plugin-trackserver/blob/v5.0.2/class-trackserver.php#L329),
   change the 3rd argument of the function call, which is now `array()`, to `array('
   osmap-fullscreen')`. Theoretically, this should cause the fullscreen control 
   from OS Datahub to be loaded first.
 * Edit: do this with the previous suggestion (commenting out those two lines) ALSO
   applied!
    -  This reply was modified 1 year, 6 months ago by [tinuzz](https://wordpress.org/support/users/tinuzz/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] Strange conflict with OS DataHub Maps plugin](https://wordpress.org/support/topic/strange-conflict-with-os-datahub-maps-plugin/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/strange-conflict-with-os-datahub-maps-plugin/#post-18082959)
 * I’d have to dive into this to give you a meaningful answer, but…
 * As the problem seems to be only related to the fullscreen functionality, I suspect
   the problem has to do with the fullscreen control, and the fact that both plugins
   use a different one.
 * Trackserver uses [https://github.com/Leaflet/Leaflet.fullscreen/](https://github.com/Leaflet/Leaflet.fullscreen/),
   OS Datahub Maps uses [https://github.com/brunob/leaflet.fullscreen](https://github.com/brunob/leaflet.fullscreen).
   They may be incompatible, but I did not do any testing to confirm this.
 * As both Leaflet plugins seem to be interchangeable in the way they are used, 
   you could try to disable loading the fullscreen control from Trackserver by commenting
   out[ lines 321 and 322](https://github.com/tinuzz/wp-plugin-trackserver/blob/v5.0.2/class-trackserver.php#L321)
   in class-trackserver.php. In theory, that would not make a difference, because
   the other control would still be loaded, and[ the code that Trackserver uses to instantiate it](https://github.com/tinuzz/wp-plugin-trackserver/blob/v5.0.2/trackserver.js#L540)
   would still work. I did not test this though.
 * Can you try this?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] Guidance on trackserver settings in WordPress](https://wordpress.org/support/topic/guidance-on-trackserver-settings-in-wordpress/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/guidance-on-trackserver-settings-in-wordpress/#post-18082831)
 * Hi.
 * I have identified the place where the ‘Result: 7|Server error’ is coming from,
   namely [here](https://github.com/tinuzz/wp-plugin-trackserver/blob/master/class-trackserver-trackme.php#L338).
   So indeed something is going wrong in your setup, but I do not know what it is.
 * Did you check your PHP logs for errors?
 * If you’re comfortable editing and debugging a bit of PHP… I’m interested in what
   the value of `$track->id` is at lines [303 ](https://github.com/tinuzz/wp-plugin-trackserver/blob/master/class-trackserver-trackme.php#L303)
   and [314 ](https://github.com/tinuzz/wp-plugin-trackserver/blob/master/class-trackserver-trackme.php#L314)
   of class-trackserver-trackme.php.
 * At those lines (one at a time), you could insert:
 * `$this->trackme_result( 7, 'Track ID: ' . print_r( $track->id, true ) );`
 * The TrackMe app should display it in the error message when you start the recording.
   A screenshot of this could help me troubleshoot the issue.
 * Just to be clear: do this on line 303 first, get a screenshot of the error, then
   remove it from line 303, add it on line 314 and make another screenshot.
 * But please also check PHP and MySQL error logs!
 * Martijn.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] Split and upload tracks](https://wordpress.org/support/topic/split-and-upload-tracks/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/split-and-upload-tracks/#post-18081225)
 * And while you’re at it, could you also try this query:
 *     ```wp-block-code
       SELECT c.* FROM ( SELECT @row := @row + 1 AS row, l.id FROM wp_ts_locations l CROSS JOIN (select @row := -1) r WHERE l.trip_id=1199 ORDER BY occurred ) c WHERE c.row IN (1,2,3,4,5); 
       ```
   
 * I’d like to know if it results in an SQL error…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Trackserver] Split and upload tracks](https://wordpress.org/support/topic/split-and-upload-tracks/)
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/split-and-upload-tracks/#post-18081115)
 * Hi,
 * This is an interesting error, as the code where it occurs hasn’t changed in more
   than 5 years. Does this error occur every time you try to split a track? Does
   it occur for all tracks, or just specific ones?
   Do I understand it correctly 
   that splitting tracks has never worked for you? I never tested Trackserver on
   MySQL 8. I’ll see if I can try to reproduce it.Regarding the track uploads, the
   reason I asked about the sort order is because your track 1199 is of 21 Sept,
   and your other tracks are of 28, 29 and 30 August, and as such they would appear
   lower in the list. To me it’s very curious that the tracks will not show in the
   default sort order, but when you change the order to ID descending, they appear
   in the list. That would be a very weird bug.
 * I don’t know how confident you are working with PHP and MySQL, but if you are,
   could you take a look at this code:
 * [https://github.com/tinuzz/wp-plugin-trackserver/blob/master/tracks-list-table.php#L195](https://github.com/tinuzz/wp-plugin-trackserver/blob/master/tracks-list-table.php#L195)
 * and run that query (with all parameters replaced with values that make sense 
   to you), to see what it does?
 * In a default WordPress install, this would be the query that’s executed for the
   default sort order (start time, descending):
 *     ```wp-block-code
       SELECT t.id, t.name, t.source, t.comment, user_id, COALESCE(MIN(l.occurred), t.created) AS tstart, COALESCE(MAX(l.occurred), t.created) AS tend, COALESCE(COUNT(l.occurred), 0) AS numpoints, t.distance FROM wp_ts_tracks t LEFT JOIN wp_ts_locations l ON l.trip_id = t.id WHERE 1 GROUP BY t.id ORDER BY tstart DESC LIMIT 0,50
       ```
   
 * Curious if tracks are missing from the results…
 * Martijn.
    -  This reply was modified 1 year, 6 months ago by [tinuzz](https://wordpress.org/support/users/tinuzz/).

Viewing 15 replies - 1 through 15 (of 415 total)

1 [2](https://wordpress.org/support/users/tinuzz/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/tinuzz/replies/page/3/?output_format=md)…
[26](https://wordpress.org/support/users/tinuzz/replies/page/26/?output_format=md)
[27](https://wordpress.org/support/users/tinuzz/replies/page/27/?output_format=md)
[28](https://wordpress.org/support/users/tinuzz/replies/page/28/?output_format=md)
[→](https://wordpress.org/support/users/tinuzz/replies/page/2/?output_format=md)