Semanticmediawiki: Chained properties not displayed when occuring multiple times

Created on 7 May 2021  Â·  2Comments  Â·  Source: SemanticMediaWiki/SemanticMediaWiki

Hi there,

I have the following Ask-query:

[[Category:Deployments]] [[Some Property::value]]

With the following printouts with a simple property chain:

?Category
?City
?City.Has Coordinates=City Coordinates

What happens is that when a city occurs multiple times in the result list, _it only prints the coordinates for the first occurrence_. This happens in both the broadtable and json output. When paginating the results, this behaviour occurs on each result.

  | Category | City | City Coordinates ⠉
-- | -- | -- | --
Result 1 | Deployments | Eindhoven | 51° 26' 21.34" N, 5° 28' 43.07" E
Result 2 | Deployments | Rotterdam | 51° 55' 22.40" N, 4° 27' 47.45" E
Result 3 | Deployments | Eindhoven |  
Result 3 | Deployments | London | 51° 30' 26.35" N, 0° 7' 39.54" W

When I explicitly join the city, it _does_ fill in all coordinates:

[[Category:Deployments]] [[City::Eindhoven]] [[Some Property::value]]

It gives:

  | Category | City | City Coordinates ⠉
-- | -- | -- | --
Result 1 | Deployments | Eindhoven | 51° 26' 21.34" N, 5° 28' 43.07" E
Result 3 | Deployments | Eindhoven | 51° 26' 21.34" N, 5° 28' 43.07" E

Please let me know if I'm querying the wrong way, or if this is an SMW bug.

Versions:

Product | Version
-- | --
MediaWiki | 1.34.0
PHP | 7.4.12 (apache2handler)
MariaDB | 10.3.25-MariaDB-0+deb10u1
Lua | 5.1.5
Semantic MediaWiki | 3.2.2

PS.
I've an issue which seems like a bug but as I'm quite inexperienced with SMW, I'll first file it as a question.
I have quite some experience with SQL though, and therefore this behaviour is quite unexpected for me.

bug

Most helpful comment

See: https://sandbox.semantic-mediawiki.org/wiki/Issue/4988.
Edit: May I suggest to label this as bug?

All 2 comments

This is the debug output of the query. If needed:
debug_error

See: https://sandbox.semantic-mediawiki.org/wiki/Issue/4988.
Edit: May I suggest to label this as bug?

Was this page helpful?
0 / 5 - 0 ratings