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
Tracker can't deal with URLs of type something?param[]=1¶m[]=2 #1774
Comments
Attachment: |
addition: apparently the piwik.js is partly responsible, so in the patch above, '%5B%5D=' needs to be replaced with '[]=', also following patch needs to be applied:
|
(In [3257]) fixes #1774 - patch by Ilinsekt; also added unit tests |
Thanks, but you forgot to read my comment posted later. locationHrefAlias in piwik.js is basically window.location.href, which is partly urlencoded and is urlencoded again in getRequest(). This results in param%5B%5D being the param name in Piwik, and since core/Common.php-> getArrayFromQueryString() only checks for [], the last param overwrites all the previous. The Action.php is related, without the patch we have param=Array put in the database. I did not notice that earlier, as the bug in piwik.js only occurs after submitting a form (otherwise it apparently uses configCustomUrl, which does not seem to be urlencoded), and I tested the patch to Action.php simply by refreshing the page. Here's the final patch:
Sorry for the inconvenience. |
(In [3258]) refs #1774 |
Seriously, it won't work without the javascript patch. I have attached some screenshots to demonstrate. |
Attachment: |
Attachment: |
I'm not ignoring piwik.js ... I just haven't had time to analyze all the implications and code a fix yet. Calling unescapeWrapper changes the semantics of some URLs which is why I haven't applied your patch. |
Ah. Sorry, I misunderstood you changing the ticket to fixed without posting a reply. |
(In [3262]) refs #1774 |
If a URL is of type something?param[]=1¶m[]=2, only the last param is recorded and stored in the database (first highlighted line in the screenshot). Following patch needs to be applied to fix this (description fits on trunk-r3248, fix in second highlighted line):
The text was updated successfully, but these errors were encountered: