Page MenuHomePhabricator

undocumented ?{blank} for first column in inline queries has some inconsistencies
Closed, DeclinedPublic

Description

Author: info

Description:
SMWQueryProcessor.php's processFunctionParams() checks to see if there's a request to display an empty title (e.g. |? ), and if so it shows the first column of page titles that match the query. You can also use this to control the label for the first column (e.g. | ?=title of first column).

But

  • This is undocumented.
  • The mainlabel parameter can turn off the display of the first column using |mainlabel=-, but ?- or ?=- don't work.
  • The documented way to label the first column is with the mainlabel parameter

The help for mainlabel, http://semantic-mediawiki.org/wiki/Help:Inline_queries#Configuring_labels.2Ftable_headers , has a comment ''This might change in future versions to provide an additional simpler method with the |-syntax.'' Is the current behavior this "additional simpler method"? Should I document it as well/in preference to the mainlabel parameter?


Version: unspecified
Severity: minor
URL: http://www.semanticweb.org/wiki/SMW_unit_test:Test_inline_query#Setting_title_of_first_column

Details

Reference
bz13707

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 10:04 PM
bzimport set Reference to bz13707.

For clarification: the |? (printout statement without giving a name) is intended to work like any other printout statement, so that users can replace the main column if deisred. Now the main column is also shown if no request for it is made, and the parameter "mainlabel" was hitherto used to deal with labelling in this case. Now there are two new functions here:

  • "mainlabel=-" hides the default display of the first column
  • ? inserts the "first column" anywhere among the printouts

Unfortunately, there is an overlap in functionality here, especially if ? is given in the first position. The special processing for mainlabel=- makes sense, since there is no other way to remove the first default column. For the other columns (including ?=label), however, this is not needed, since any of those extra printouts can be hidden by just not writing it down. If "?=-" would do anything special, then it would be to hide *this* printout, but not the default first-column printout. I am not really happy with mainlabel=..., but I do not see a backwards-compatile way to proceed otherwise.

You are of course right about the incomplete documentation here. I mark that bug as "later" since I know not what to do now (which does not affect the docu issue).

[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!]

Aklapper subscribed.

The Semantic MediaWiki developers requested in https://phabricator.wikimedia.org/T64114 to move their task tracking to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues and to close remaining tasks in Wikimedia Phabricator. If you still face the problem reported in this task in a supported version of SMW, please feel free to transfer your report to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues . We are sorry for the inconvenience.