Last modified: 2012-09-15 06:41:02 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 T40194, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38194 - jqplotbar requires explicit distributionlimit
jqplotbar requires explicit distributionlimit
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticResultFormats (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Jeroen De Dauw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-05 09:14 UTC by Mathias Lidal
Modified: 2012-09-15 06:41 UTC (History)
3 users (show)

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


Attachments

Description Mathias Lidal 2012-07-05 09:14:13 UTC
Currently a jqplotbar diagram will not be shown unless you define an explicit value for distributionlimit, which shouldn't be the case.

Some investigation reveals that the problem is in SMWAggregatablePrinter::applyDistributionParams(), in the following code block:

if ( $this->params['distributionlimit'] !== false ) {
	$data = array_slice( $data, 0, $this->params['distributionlimit'], true );
}

The default value for distributionlimit is 0, which will trigger the if-condition and cause data to be sliced into nothing.

A quick fix will be to either change the comparison operator to != (i.e. allow type juggeling) or compare to 0 instead of false.
Comment 1 Mathias Lidal 2012-07-05 09:17:24 UTC
Patch sent to gerrit: https://gerrit.wikimedia.org/r/14282
Comment 2 Jeroen De Dauw 2012-07-05 09:44:42 UTC
https://gerrit.wikimedia.org/r/#/c/14284/

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


Navigation
Links