Last modified: 2013-11-14 19:47:18 UTC
I have a property called "page" which has "[[has type::number]]" set for it. It's supposed to represent a page number in a book. I have several MW pages which have "page" set for them, like "[[page::100]]". When I do an inline #ask query with "sort=page", it sorts by page alphabetically instead of numerically. The test case on the original wiki is here: http://trans.rpground.ru/index.php?title=Test It reproduces on the sandbox wiki: http://sandbox.semantic-mediawiki.org/wiki/Sorting_test It seems to be dependent on property's name, "page" always sorts as string even if it's marked as number. Replacing property name for "pagenum" solves the problem, but it looks ugly. The problem didn't exist on a SMW version from a year or so ago. It only appeared after I updated to version for 1.21 MW.
Looks like the problem is not sorting for numbers - this appears to work quite fine for the last query on the page you linked. It is that the "page" property is behaving as if it was of type page, rather then of type number, as is specified. I am not sure why this is happening, the wikitext looks correct. Perhaps "page" is a reserved name for properties that can only be of type page?
Probably, but it isn't listed in Help:Special properties for SMW: http://semantic-mediawiki.org/wiki/Help:Special_properties