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

Internal site search decoding bug #15060

Open
KALLIAK opened this issue Oct 25, 2019 · 8 comments · May be fixed by #16628
Open

Internal site search decoding bug #15060

KALLIAK opened this issue Oct 25, 2019 · 8 comments · May be fixed by #16628
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@KALLIAK
Copy link

KALLIAK commented Oct 25, 2019

We have site in russian language in windows-1251 codepage and all working fine except internal site serch keywords.

E.g. when I try to find ‘окрб’ this keyword turns to url encoded ‘q=%EE%EA%F0%E1’ and then in database it turns to some wierd encoded string ’ îêðá’.

There is small 2-HTML page site (windows-1251) where the problem can be reproduced:
test.zip

Matomo 3.11.0
Thanks!

@mattab mattab added this to the 3.13.0 milestone Oct 25, 2019
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Oct 25, 2019
@tsteur tsteur modified the milestones: 3.13.0, 4.2.0, 4.1.0 Nov 3, 2019
@tsteur
Copy link
Member

tsteur commented Nov 3, 2019

@mattab moved this to 4.1.0 as it's not a regression.

@sgiehl
Copy link
Member

sgiehl commented Dec 18, 2020

I've just checked that one. For me it seems to work as expected. Maybe that is meanwhile fixed with utf8mb4 support.

@tsteur tsteur added Can't reproduce (yet) For issues that are reported by several people, but can't be reproduced reliably and need more data Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. worksforme The issue cannot be reproduced and things work as intended. labels Dec 20, 2020
@tsteur
Copy link
Member

tsteur commented Dec 20, 2020

Hi @KALLIAK it looks like this might be fixed. If you can still reproduce this using Matomo 4 after migrating the DB to UTF8MB4 then please comment here and we will be happy to reopen the issue and investigate again.

@tsteur tsteur closed this as completed Dec 20, 2020
@KALLIAK
Copy link
Author

KALLIAK commented Dec 21, 2020

Hi @tsteur Just tested my test.zip with the freshly installed Matomo 4.0.5 and the problem remains.
This problem has nothing to do with the database, because the GET request to the tracker passes already corrupted keyword, i.e. the problem is in matomo.js, namely in the call "locationHrefAlias = safeDecodeWrapper(locationArray[1])". safeDecodeWrapper("%EE%EA%F0%E1") returns "îêðá", but it "must" return "окрб". When I remove "safeDecodeWrapper" and leave "locationHrefAlias = locationArray[1]", the problem goes away, but it is not a solution as far as I understand.
But for more than a year I solve the problem this way, with each patch I have to mess with yuicompressor-2.4.8.jar, etc.)

@sgiehl
Copy link
Member

sgiehl commented Dec 21, 2020

@KALLIAK Which browser are you using? I had tried your example, and as long as the encoding of the file is windows-1252 and served as such it worked at least in Chrome. When you are viewing the page in your browser is the page title displayed correctly?

@KALLIAK
Copy link
Author

KALLIAK commented Dec 21, 2020

We have windows-1251 encoding. We tried all famous browsers.
When I try to find "тест", I get this url: "matomotest/find.html?q=%F2%E5%F1%F2"
And then it turn to this request:
matomo_1251_bug

@sgiehl
Copy link
Member

sgiehl commented Dec 21, 2020

Checked that again and now I was able to reproduce.

@sgiehl sgiehl reopened this Dec 21, 2020
@sgiehl sgiehl removed Can't reproduce (yet) For issues that are reported by several people, but can't be reproduced reliably and need more data Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. worksforme The issue cannot be reproduced and things work as intended. labels Dec 21, 2020
@sgiehl
Copy link
Member

sgiehl commented Dec 21, 2020

this would actually be solved with #16628

@sgiehl sgiehl linked a pull request Dec 21, 2020 that will close this issue
@mattab mattab modified the milestones: 4.1.0, 4.2.0 Dec 21, 2020
@mattab mattab changed the title Internal site serach decoding bug Internal site search decoding bug Dec 21, 2020
@mattab mattab modified the milestones: 4.2.0, 4.3.0 Feb 22, 2021
@mattab mattab modified the milestones: 4.3.0, 4.4.0 May 26, 2021
@tsteur tsteur linked a pull request Jul 22, 2021 that will close this issue
@tsteur tsteur modified the milestones: 4.4.0, 4.7.0 Jul 22, 2021
@tsteur tsteur modified the milestones: 4.8.0, 4.9.0 Feb 9, 2022
@tsteur tsteur modified the milestones: 4.9.0, 4.10.0 Mar 2, 2022
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

Successfully merging a pull request may close this issue.

5 participants