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
visit action url is garbled #13424
Comments
Can you maybe paste the path part of the URL in here? This will make it easier to reproduce so we can copy/paste. Cheers |
And piwik can not export to json format data if piwik had this kind of visit record . |
I think, I have solved this issue. But please help me to check if it will have any site-effect. Thanks in PageUrl.php, I change as the follow:
|
Sorry, this is correct code:
|
Best would be you create a PR its easier to read and test. |
FYI: Path and query is not defined in above code. The method seems like a good place where it may be buggy since it is used by both the downloads and the visitor details report. |
finally, we replace parse_url with the following method:
|
Got another report from a customer: Proper solution use mb_ functions?This is the parse_url function that raises concerns about some configurations https://bugs.php.net/bug.php?id=52923 By replacing this function with this one http://php.net/manual/en/function.parse-url.php#114817 matomo/core/Tracker/PageUrl.php Line 43 in af3a79c
it may solve the problem? I think it would take a larger fix such as for strtolower (#10083) since this is not the only place where matomo uses parse_url. Initial errorURL = /index.php?forceView=1&viewDataTable=VisitorLog&module=Live&action=getLastVisitsDetails&small=1&idSite=7&period=day&date=today&showtitle=1&random=6013
The error is triggered: it seems at this line
|
FYI In customer's case (in previous comment) the issue was fixed (or rather: worked around) by configuring PHP to use |
I add in Core/Common.php http://php.net/manual/en/function.parse-url.php#114817 with support of optionnal arg "component" (see below) and replace everywhere parse_url by Common::mb_parse_url .
in files when it is not present
|
@guytarr would you mind creating a PR with your changes? |
I updated to version 4 and converted the database tables to utf8mb4. Now everything shows up as expected! |
Thanks for contributing to this issue. As it has been a few months since the last activity and we believe this is likely not an issue anymore, we will now close this. If that's not the case, please do feel free to either reopen this issue or open a new one. We will gladly take a look again! |
Wimdows 2016 IIS + PHP 7.1.10
If the page url is chinese, it will display garbled in visit record page and export to json/xml (but data is correct in db).
Hiw can I solve it ?
The text was updated successfully, but these errors were encountered: