Page MenuHomePhabricator

Parameter coordinates must be one or more valid locations
Closed, DeclinedPublic

Description

This was originally posted on the mailing list here, with no responses, so I assume it's a valid bug:

http://old.nabble.com/-SM--Parameter-coordinates-must-be-one-or-more-valid-locations-to32277495.html

I suspect it is related to this bug somehow:

https://bugzilla.wikimedia.org/show_bug.cgi?id=30354

The short version is that properly formatted Semantic Maps queries either produce no output at all, or produce correct output, along with incorrect errors.

I tested, and tested, and tested for a couple of weeks, and I could not get Semantic Maps to work properly in any test situation I tried (I think I tried them all, that would work for me). I had to just give up on using Semantic Maps until this gets sorted out, but I could not narrow down exactly what was causing the bugs. Hopefully you won't have any trouble reproducing it.

The details:

Very frequently I see this error on semantic maps, even on the documentation examples:

The following error has been detected in your syntax:

  • Parameter coordinates must be one or more valid locations.The value "" has been omitted.

What is causing that, if everything looks correct, even Jeroen's examples?:

http://wiki.bn2vs.com/Maps/Sandbox
http://wiki.bn2vs.com/Semantic_Mapping_with_MediaWiki

And, why do these examples not have that problem?:

http://mapping.referata.com/wiki/Examples/Maps_with_multiple_points


Version: unspecified
Severity: normal

Details

Reference
bz30534

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:52 PM
bzimport set Reference to bz30534.
bzimport added a subscriber: Unknown Object (MLST).

Have a look here: http://wiki.bn2vs.com/User:WLM/map_test

Note that the sandbox (not examples) on my wiki contains lot's of outdated syntax, and things put in by other people. Even things intentionally incorrect to see how that gets handled. For proper examples, refer to the actual documentation.

OK, it seems the documentation does not explain what is going on in those examples:

Doing it wrong

{{
#display_points:
service=googlemaps

coordinates=52.5234051,13.4113999;52.5234051,13.4113999;
height=500
width=800
controls=panzoombar,scaleline,overviewmap,keyboarddefaults,navigation,layerswitcher
zoom = 10

}}

Doing it right

{{
#display_points:
service=googlemaps

coordinates=52.5234051,13.4113999;52.5234051,13.4113999
height=500
width=800
zoom = 10

}}

Doing it better

{{
#display_points:52.5234051,13.4113999;52.5234051,13.4113999

service=googlemaps
height=500
width=800
zoom = 10

}}

It appears that the final point must not have a semicolon. It isn't easy to add semicolons and then remove the last one in a semantic query. If it can't be done with a query, then this bug needs to be reopened - and of course, the documentation updated to explain the correct way to do this. I don't understand what's going on with this, and I haven't gotten a query version to work due to this bug:

https://bugzilla.wikimedia.org/show_bug.cgi?id=30354

So I can't update the documentation with an explanation of how to do it in a useful query.

I've become frustrated with trying to use Semantic Maps in queries during the last 2 to 3 weeks, so if I'm missing something "obvious", let me know.

Behaviour has been like this for 2 years and no one ever complained about, and I've also not seen people do it wrong, so I very much doubt the docs should mention this. Why would you place a delimiter used to separate values after the last value?! If you really feel it should be in the docs, then please update them. It's a wiki for something.

No need to be hostile, I do my best with the docs once I understand the subject thoroughly. As I mentioned, I don't understand this yet. Most of my documentation work has already been removed, so I'm not sure how to proceed in the future. I'm still collecting notes for it though, in case I can come up with an idea of how to get them published without being removed.

As for the semicolon, I'm sure you understand that templatized queries with unnamed parameters repeat - so, if there's a semicolon on one coordinate, there's a semicolon on all of them, including the troublesome last one.

Normally delimiters don't have a negative effect after the last value. That's why all programming languages I can think of that use them, use them consistently, including on the last statement. PHP, the language used for Semantic Maps does it that way too.

I'm not sure why someone running into problems with an unusual handling of this would inspire hostility. I don't think the time it takes for someone to report a problem has any meaning. That's why aircraft designs get fixed after people die in them. Before that, people may see the problem, but they don't report it.

Or, it gets received with hostility, like with NASA's Challenger.

Bug is invalid, do not reopen it because for some reason you figure I'm hostile. I'm providing support here, and you seem to be determined to waste my and other peoples time.

I'm not wasting anybody's time. I spent 2 weeks working on this issue so I could report it for you. I asked about it on the mailing list, and got no responses.

You didn't explain the problem comes from the semicolon. I spent my time rereading documentation and testing the examples until I figured it out on my own. I haven't asked you to provide support here.

I assume you have your extension on bugzilla because you want people to report problems. I also assume that other people doing that for you SAVES you time.

I'm sorry if reopening the bug annoyed you, that was not my intention. Reread comment 2, it says I think the the bug needs to be reopened because it breaks semantic queries when using templates in the query.

If my conclusion on that is wrong, you haven't said anything about that yet.

I'm going to go ahead and reopen this. There's no explanation here as to why it's invalid, and no responses on the mailing list either:

http://old.nabble.com/-SM--Parameter-coordinates-must-be-one-or-more-valid-locations-to32277495.html

I believe I have correctly identified a bug that breaks semantic maps queries when using templates. Don't shoot the messenger.

It appears that this site may be having the same, or similar issue:

https://hackerspace.be/Semantic_Mapping_with_MediaWiki

I think it might be the problem with the delimiters that we isolated in comment 2.

In comment 3 you seemed like you would allow me to document this bug. However, the documentation that I had planned on describing this issue, and possible workarounds, was deleted by you. I had another administrator restore it, and move it to my user page. I updated those docs with some info about this bug here:

https://www.mediawiki.org/wiki/User:Badon/Extension:Semantic_MediaWiki/Manual#Shortcomings_and_limitations_2

If you promise not to delete it from the Semantic Maps docs (until the bug is fixed), I can write it up in more detail and update the wiki there. If you intend to delete it, I'll not waste my time on the Semantic Maps docs, and put the effort into my user page docs instead.

Let me know if you will agree to not delete the documentation, so I can not waste my time writing it, and so you won't have to waste your time in deleting it.

Aklapper subscribed.

The Semantic MediaWiki developers requested in https://phabricator.wikimedia.org/T64114 to move their task tracking to https://github.com/SemanticMediaWiki and to close remaining tasks in Wikimedia Phabricator. If you still face the problem reported in this task in a supported version of SMW, please feel free to transfer your report to https://github.com/SemanticMediaWiki/SemanticMaps/issues . We are sorry for the inconvenience.