Last modified: 2011-01-23 16:50:27 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 T28890, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26890 - the "default=" query parameter doesn't work with the #show parser function.
the "default=" query parameter doesn't work with the #show parser function.
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-23 15:54 UTC by Dan Bolser
Modified: 2011-01-23 16:50 UTC (History)
1 user (show)

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


Attachments

Description Dan Bolser 2011-01-23 15:54:24 UTC
If you #ask for a certain property from a certain page, no default text is shown if the page exists but doesn't carry that property (default text is only shown when no pages are returned).

i.e. page X does not have the property y, the following returns blank:

{{#ask: [[X]] | ?y | default = can't see me}}


This may be well and good for #ask, but it means that #show will never show the default text (assuming it's page exists), which seems strange.


Do we need a default-per-property syntax?

{{#ask: [[X]] | ?y = The value of y # y is undefined}}


or something like that?
Comment 1 Markus Krötzsch 2011-01-23 16:50:27 UTC
Yes, I think that this is probably best addressed by a default value for property printouts in queries. Using the existing printout parameter syntax, the appropriate way of supporting this would be 

{{#ask: [[X]]
| ?y |+default=No values for y
| ?z |+default=No values for z
}}

Unfortunately, printout parameters are not currently supported by Special:Ask. It is also not so clear how this would fit into the internal architecture regarding datatypes. Some formats like timeline expect Type:Date properties to return dates, but the default value would probably rather be a Type:String value.

If these two issues can be addressed, it seems like a useful feature to implement.

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


Navigation
Links