Last modified: 2013-11-14 19:47:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59061, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57061 - Numerical sorting doesn't work for inline query
Numerical sorting doesn't work for inline query
Status: UNCONFIRMED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
PC Linux
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-14 17:09 UTC by EvilCat
Modified: 2013-11-14 19:47 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description EvilCat 2013-11-14 17:09:42 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.
Comment 1 Jeroen De Dauw 2013-11-14 18:48:06 UTC
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?
Comment 2 EvilCat 2013-11-14 19:47:18 UTC
Probably, but it isn't listed in Help:Special properties for SMW:

http://semantic-mediawiki.org/wiki/Help:Special_properties

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links