Last modified: 2011-07-15 12:39:22 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 T31901, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29901 - Queries with no conditions should not return all pages
Queries with no conditions should not return all pages
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-14 21:30 UTC by badon
Modified: 2011-07-15 12:39 UTC (History)
1 user (show)

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


Attachments

Description badon 2011-07-14 21:30:55 UTC
When something goes wrong, such as the current behavior where "Category:+" should act as a wild card but instead acts as a nonexistent category (https://bugzilla.wikimedia.org/show_bug.cgi?id=29900), the query returns all pages in the wiki, which is not only unuseful, but also likely to be confusing and more of a problem than simply displaying nothing when nothing is found. Instead, nothing should be returned if there is nothing that matches the query.

See also:

https://bugzilla.wikimedia.org/show_bug.cgi?id=29891#c2

...the reason that [[Category:+]] does not work is simply that it is
ambiguous with SMW's way of searching for pages in the category called "+".
Since this is not a valid page, the query ends up having no conditions and all
pages are returned.
Comment 1 Jeroen De Dauw 2011-07-14 22:09:17 UTC
SMW drops invalid conditions. If you only have one condition, and it's invalid, indeed everything will be shown. Whenever there is at least one invalid condition, an error icon will be displayed underneath the query listing the invalid conditions.

As far as I'm concerned, this is perfectly reasonable behavior, so I'm tempted to mark this as invalid.
Comment 2 badon 2011-07-14 23:03:41 UTC
It's reasonable when there's more than one condition, but if there's only one, showing everything is a mess. I suppose it would have to be handled as a special case. 

It's especially confusing for someone that doesn't know why it's giving incorrect results, and damages credibility for a site that may be giving information this way. 

My imagination could come up with instances where the consequences could be particularly damaging either to the user of the data or the site supplying the data. How about if SMW were adopted to dispense pharmaceutical information? Giving incorrect results by default becomes clearly a bad choice in any situation where getting wrong data could kill people, cost somebody money, provoke legal consequences, and so forth.

Marking this as invalid is not recommended.
Comment 3 Markus Krötzsch 2011-07-15 12:39:22 UTC
SMW has a setting to configure this behaviour. The default is to ignore query errors and execute the query anyway (even if empty). You can change this by setting $smwgIgnoreQueryErrors = false; in LocalSetting.php. With this setting, only the error message will be shown when an error occurred in processing the query.

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


Navigation
Links