Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

segment breaks sparklines in VisitsSummary #2801

Closed
anonymous-piwik-user opened this Issue · 3 comments

3 participants

@anonymous-piwik-user

VisitsSummary module's action 'getSparklines' has broken images when using a segment in the URL params. Instead of sparklines, broken images appear.
E.g.: http://demo.piwik.org/index.php?module=VisitsSummary&action=getSparklines&idSite=3&period=month&date=2011-11-24&disableLink=1&segment=country==DE,country==US&token_auth=e559d132f5eda5d8c2d3ce037cfd99a7
Good news! I fixed it locally, and will be submitting a patch soon. It was only a 3-line

fix: reaplce lines Piwik_Common, lines 390-392 "$exploded = explode('=',$value);
$name = $exploded[0];
$value = $exploded[1];

with

$locationOfSeperator=strpos($value,'=');
$name=substr($value,0,$locationOfSeperator);
$value=substr($value,$locationOfSeperator+1);

The problem was normally the inputted value is just a key=value string, but for segments its key=subkey==value, so exploding on '=' broke lost everything after the second '='.
Keywords: segment, sparklines,

@mattab
Owner

Thanks for report and patch!

@robocoder
Collaborator

(In [5483]) fixes #2801

@anonymous-piwik-user anonymous-piwik-user added this to the 1.7 Piwik 1.7 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.