Can't sort an #ask table in semantic mediawiki

44 views Asked by At

This should be straightforward, but I just can't get it to work... I have a semantic mediawiki installation with a few pages with properties and an "#ask" which displays a table of those properties. I believe using "order=" on the #ask should specify the default display order for the table, but no matter what I do, they always display in creation order.

Example query:

{{#ask:
[[Category:Object]]
|?Prop
| format=table
| sort=Prop
| order=asc
}}

With 3 pages containing the following content:

[[Category:Object]]
[[Prop::11]]
[[Category:Object]]
[[Prop::33]]
[[Category:Object]]
[[Prop::22]]

But the table always displays with the Prop order of "11, 33, 22". The arrows reorder the table correctly, it's just the default order I can't influence.

Running "semantic mediawiki 4.1.0" with "Semantic Result Formats 4.0.1" on "MediaWiki 1.38.4".

I've compared with demos and even reinstalled semantic mediawiki, but nothing affects it. I've declared Property:Prop as [[Has type::number]]. Feels like it's something more fundamental than syntax.

Any suggestions?

1

There are 1 answers

0
Oli Reading On

Finally discovered the answer - I had variable $smwgQSortFeatures set to a duff value which had the side-effect of disabling all sort features. When I disabled the assignment, all search behaviour and GUI came back to life!!