Last modified: 2014-08-19 05:51:04 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 T24583, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22583 - ask query removes results with no value for a property when sorting by it
ask query removes results with no value for a property when sorting by it
Status: REOPENED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
PC Windows XP
: Lowest major (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-19 10:20 UTC by mhn
Modified: 2014-08-19 05:51 UTC (History)
2 users (show)

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


Attachments

Description mhn 2010-02-19 10:20:54 UTC
[[Overview]]
The ask query removes all results without value for a property that is specified in the "sort" parameter.

[[Steps to Reproduce]]
For example, if I have a page P1 in category C with a property [[has X::value]] and another page P2 in same category C without the "has X" property. They both use the same template and same semantic form.

[[Actual Results]]
When I write:

{{#ask: [[Category:C]]
|?has X
|sort=has X
|order=asc
}}

it displays only page P1.

But:
{{#ask: [[Category:C]]
|?has X
}}

displays both P1 and P2 pages.

[[Expected Results]]
it should have displayed both P1 and P2 in both cases.
Comment 1 Markus Krötzsch 2010-03-02 08:31:29 UTC
This is the normal and expected behaviour of SMW as described in the documentation. Please read the manual for details:

http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Sorting_results
Comment 2 mhn 2010-03-02 08:54:34 UTC
(In reply to comment #1)
> This is the normal and expected behaviour of SMW as described in the
> documentation. Please read the manual for details:
> 
> http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Sorting_results

You are right..I mean that's what the docs say. However, I think such logic inside SMW could mislead users with large quantities of data thinking that the results are actually all results and thus unnecessary debugging effort to find the issue could appear.

Isn't there any hack or something to have pages without the sorted property appear in the result set?

Thanks.
Comment 3 Markus Krötzsch 2010-03-02 14:27:49 UTC
There is no such hack, other than adding a default property value to all pages (e.g. by means of a template).
Comment 4 Andre Klapper 2012-12-20 13:30:10 UTC
[Removing RESOLVED LATER as discussed in http://lists.wikimedia.org/pipermail/wikitech-l/2012-November/064240.html and announced in https://sourceforge.net/mailarchive/forum.php?thread_name=CALFVSbXkiffYy6HkhEWE0RtRrJ%2B2ebPz3g00gsr%2Bdz%2B1nZWsDA%40mail.gmail.com&forum_name=semediawiki-devel . Reopening and setting priority to "Lowest". For future reference, please use either RESOLVED WONTFIX (for issues that will not be fixed), or simply set lowest priority. Thanks a lot!]
Comment 5 Alexander Mashin 2014-03-02 08:17:38 UTC
I support the idea that a query, when asked to sort, should not filter.
Comment 6 Ralf Krüdewagen 2014-08-19 05:51:04 UTC
+1 for fixing this. The result should not depend on the sort condition. This is unexpected behavior from end-user perspective and confuses.

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


Navigation
Links