Last modified: 2012-11-07 04:07: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 T27915, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25915 - Format Failure when using format=template and limit=0
Format Failure when using format=template and limit=0
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal major with 1 vote (vote)
: ---
Assigned To: Markus Krötzsch
:
: 24946 (view as bug list)
Depends on: 37441
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-13 16:14 UTC by skew
Modified: 2012-11-07 04:07 UTC (History)
4 users (show)

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


Attachments

Description skew 2010-11-13 16:14:28 UTC
A query the uses:

|format=template
|template=sometemplate
|limit=0

will show the "... further results" in a table and not using the "sometemplate" format.  If at least 1 record is shown with

|limit=1

the further results link will show the properly formatted results.

Example:

    http://scratchpad.referata.com/wiki/BuildList
Comment 1 Jeroen De Dauw 2010-11-13 17:00:13 UTC
So what should be different exactly?
Comment 2 skew 2010-11-13 17:03:46 UTC
"... further results" should take me to a page that presents data using the template, not a broadtable.
Comment 3 Jeroen De Dauw 2010-11-13 17:05:04 UTC
(In reply to comment #2)
> "... further results" should take me to a page that presents data using the
> template, not a broadtable.

Oh ok, now I get it. Will have a look soonish.
Comment 4 Jeroen De Dauw 2010-11-13 18:11:41 UTC
The issue is that the HTML that is outputted is not valid. Basically what's done is list items in divs in a list. What should be done is list items in a list per column (div).
Comment 5 Jeroen De Dauw 2010-11-13 18:32:13 UTC
When the limit is 0, no results are printed, and the getResultText method of the query printer is never called. This method causes the template parameter to be set in the further results link, so this issue is not limited to the list formats, but occurs for every query with limit 0, and all parameters that would normally be passed along.
Comment 6 skew 2010-11-13 19:46:47 UTC
That makes sense, and perhaps when the "Result limits and links to further results" section was written (http://semantic-mediawiki.org/wiki/Help:Inline_queries#Result_limits_and_links_to_further_results), only the table case was used.  Do you anticipate the fix being difficult?
Comment 7 Jeroen De Dauw 2010-11-14 08:22:12 UTC
To fix this, you'd need to make changes to every query printer. I'm not sure this feature is worth it, as you can achieve similar results by creating your query on Special:Ask, and then linking to it.

In reply to comment 4: Accidentally posted this with the wrong bug :)
Comment 8 MWJames 2011-11-18 04:21:04 UTC
We understand the implication, why limit=0 causes trouble but handling further results via #ask is much simpler and easier than to have to generate the actual URL and replace #ask with {{fullurl ... }}.

For example, in our case we use a lot of graphs that displays a limit amount of data while allowing an additional link to Special:Ask page where the user can display a larger set of data. At the moment all those additional links are {{fullurl: }} to point to Special:Ask but as soon something changes its quite a bit of work to get all the URLs working again. Therefore we still will vote for this request and whenever someone finds the time to get it right we will be happy.
Comment 9 MWJames 2011-11-18 04:22:59 UTC
*** Bug 24946 has been marked as a duplicate of this bug. ***
Comment 10 Jeroen De Dauw 2011-11-18 11:58:27 UTC
Just re-read the issue and my analysis of the problem. The current way extra params are passed to the further results links is rather ugly and fragile, and can now that Validator is used, be replaced by a much nicer and generic system. Doing this ought to solve this issue, but it's a bunch of work. Also, I think there are enough such changes for 1.7 already and am tempted to defer this to a later big release, ie 1.8 or so.
Comment 11 MWJames 2012-06-10 07:48:18 UTC
Add 37441 dependency.
Comment 12 MWJames 2012-11-07 04:06:55 UTC
Works with SWM 1.8
Comment 13 MWJames 2012-11-07 04:07:27 UTC
Well I meant SMW 1.8

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


Navigation
Links