@anonymous-piwik-user opened this issue on June 22nd 2009

When trying to detect if we have a campaign keyword, the code calls

Piwik_Common::getParameterFromQueryString($this->currentUrlParse['query'], $campaignKeywordVariableName);

the $urlQuery is: ariba_campaign=Adwords-CPC&ariba_kwd=My killer keyword and the $parameter is ariba_kwd

Note that the &amp was inserted when calling parse_url

The comment of the function Piwik_Common::getParameterFromQueryString:

 * @param string $urlQuery result of parse_url()['query'] and htmlentitied (& is &) eg. module=test&action=toto or ?page=test

and it does appear that since the "&" is now & it has been htmlspecialchar'ed.

However since the split happens on &, we get &ariba_kwd=My killer keyword and do not match ariba_kwd ##

Note that this comment indicates that this data is expected in this format:

/**
 * Returns the value of a GET parameter $parameter in an URL query $urlQuery
 *
 * @param string $urlQuery result of parse_url()['query'] and htmlentitied (& is &) eg. module=test&action=toto or ?page=test
 * @param string $param
 *
 * @return string|bool Parameter value if found (can be the empty string!), false if not found
 */
static public function getParameterFromQueryString( $urlQuery, $parameter)

##

I might try to fix this in my local copy, but I'm new enough to Piwik to be leery of anything more at the moment.

@robocoder commented on June 22nd 2009

dupe #697; fixed in svn

This issue was closed on August 14th 2009
Powered by GitHub Issue Mirror