• Resolved tracked

    (@tracked)


    Hi,

    I’d been playing around with Trackserver and noticed that the Shortcode infobar template field has completely disappeared from the “Your Profile” window. At least I’m pretty sure that’s where it was.

    Now all I have is the “Shortcode infobar template” text but no field to edit. Because I’m using Locus Maps I put in GSM_signal and battery strength just to experiment and see if Trackserver worked with these. I guess not. How’s best to rectify? Full uninstall?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author tinuzz

    (@tinuzz)

    I’m not sure if I understand you correctly. Did the edit field disappear in the release version of Trackserver, or after you changed the PHP source code?

    If it’s the former, I have no idea what is wrong. Maybe you can send me the HTML source code of the user profile page?

    If it’s the latter, you can always get the released code from Github, see what the differences are and fix the problem. Otherwise, just download ‘trackserver.php’ and replace the file in your installation. A full uninstall / reinstall might cause you to lose data, so I would be careful with that.

    Best regards,
    Martijn.

    Thread Starter tracked

    (@tracked)

    Hi Martijn,

    Can I just ask.

    This is where the Infobar free test field should be isn’t it? I think I’m going mad….

    https://imgur.com/a/PDvkr

    Plugin Author tinuzz

    (@tinuzz)

    Yes, that’s the place, along with the text:

    “With live tracking, an information bar can be shown on the map, displaying some data from the latest trackpoint. Here you can format the content of the infobar. Possible replacement tags are {lat}, {lon}, {timestamp}, {altitude}, {speedms}, {speedkmh}, {speedmph}, {userid}, {userlogin}, {displayname}.”

    Plugin Author tinuzz

    (@tinuzz)

    Where I now see that the {distance} tag is missing in the text ??

    Thread Starter tracked

    (@tracked)

    OK, I’ll describe the problem that I’m having.

    Yesterday I inserted some additional information that Locus Maps supports. GSM_signal (%) and battery (%). I’m wondering if it was these that caused the problem?

    This morning I browsed to my website to find an internal server error 500.

    Since Trackserver was the only plug-in I’d been playing with I logged into the server and manually disabled it.

    Then I was able to browse to my website.

    I then logged in and went to the plug-ins section. Trackserver was still in the list so I deleted it.

    Then I reinstalled it, but still the infobar text field was missing. That’s when I took the screenshot that you see above.

    I have just deleted Trackserver again and reinstalled, as new, with the newly updated version 4.01. This hasn’t resolved my problem as the free text field is still missing.

    So, I’m not as technically astute as you are with regards to php. But where is this Infobar data saved? Is there a separate database that I can locate and manually delete as my erroneous syntax is being retained somewhere, and I need to remove it to stop this conflict within my WordPress install.

    Thanks

    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    That is quite strange. Removing and reinstalling the plugin should normally undo any local modification. “Reset to factory settings”, so to speak. A 500 internal server error is likely to be caused by a syntax error in the PHP code. Maybe you can find in the PHP error log what was causing the 500 error.

    Is the 500 internal server error gone now that you’re running v4.0.1?

    The infobar template string, along with other user profile data, is saved in WordPress’ wp_usermeta table (if you don’t use a custom table prefix). There should be a row for your user id with ‘meta_key’ set to ‘ts_infobar_template’, with your template in the ‘meta_value’ column.

    If the value of the template is the problem, this indicates a HTML escaping problem in Trackserver. I will investigate.

    For the rest, I’m not sure what to tell you, since a reinstall doesn’t seem to help. Just to be sure, you could download the main plugin file from here:

    https://github.com/tinuzz/wp-plugin-trackserver/blob/master/trackserver.php

    and overwrite it on your server. Removing the ‘ts_infobar_template’ from wp_user_meta could also help.

    Please let me know how it goes.

    Cheers,
    Martijn.

    • This reply was modified 7 years ago by tinuzz.
    Plugin Author tinuzz

    (@tinuzz)

    Hi, I have reproduced and found the problem. The issue is with printf() placeholders in usermeta values. I will create a fix ASAP. For now, you should be able to fix the problem by removing all % characters from the template string.

    Thanks for the report.

    Martijn

    Plugin Author tinuzz

    (@tinuzz)

    I just released v4.0.2 with fixes for unescaped values in printf() format strings.

    This should allow you to use ‘%’ charachters in the infobar template, and it should prevent problems when ‘%’ characters are used in other inputs.

    Can you confirm that v4.0.2 fixes your problem?

    Thanks,
    Martijn.

    Thread Starter tracked

    (@tracked)

    Sorry for the delay. OK I’ve updated to 4.0.2 and the text field is back within the My Profile section, so thanks for that.

    For some reason the infobar isn’t appearing on my map any longer. I do have infobar=true within the shortcode.

    So I selected only Coordinates: {lat}, {lon} within the Shortcode infobar template.

    Still no Infobar

    I then removed most of the syntax within the Tsmap shortcode, excluding the infobar=true, to the bare minimum and that made no difference.

    I’m still investigating…

    I haven’t yet tried removing the ‘ts_infobar_template’ from wp_user_meta so I’ll look into that now

    • This reply was modified 7 years ago by tracked.
    Plugin Author tinuzz

    (@tinuzz)

    Hm ??

    For me, it still works, even with weird characters in the template.

    Can I have a look at the page where the map is shown? You can send the URL to me privately if you prefer: [email protected].

    Thread Starter tracked

    (@tracked)

    So deleting the plug-in from WordPress will remove the gpx files but it doesn’t remove the syntax from within the various Trackserver profile fields.

    When I reinstall the plug-in my previous geofenced co-ords are still there and so is my Infobar syntax.

    Is that normal behaviour or does this mean my WordPress database needs cleaning? Those fields don’t return to your default settings.

    Plugin Author tinuzz

    (@tinuzz)

    You’re right, I found that out earlier today. The database tables are removed, the settings are cleaned up, but the user metadata is not. I will fix that in a future release.

    Thread Starter tracked

    (@tracked)

    Thanks Martijn. All sorted now.

    Plugin Author tinuzz

    (@tinuzz)

    Great, thanks!

    Martijn.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Shortcode infobar template’ is closed to new replies.