Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segment breaks sparklines in VisitsSummary #2801

Closed
anonymous-matomo-user opened this issue Nov 25, 2011 · 3 comments
Closed

segment breaks sparklines in VisitsSummary #2801

anonymous-matomo-user opened this issue Nov 25, 2011 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

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,

@anonymous-matomo-user
Copy link
Author

Attachment:
Screen shot 2011-11-25 at 1.26.10 PM.png

@mattab
Copy link
Member

mattab commented Nov 25, 2011

Thanks for report and patch!

@robocoder
Copy link
Contributor

(In [5483]) fixes #2801

@anonymous-matomo-user anonymous-matomo-user added this to the 1.7 Piwik 1.7 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants