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

Fixes Segmented Visitor Log with segments containing spaces #13198

Merged
merged 1 commit into from Aug 1, 2018

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jul 23, 2018

fixes #13113

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Jul 23, 2018
@sgiehl sgiehl added this to the 3.6.0 milestone Jul 23, 2018
@diosmosis
Copy link
Member

Shouldn't the parameter be encoded automatically in ajax requests? Seems like this would double encode it (which should work because matomo handles it specifically, but it seems like a fix that could cause problems later). Maybe we should be urlencoding the values that can have spaces when adding the segment label?

@fdellwing
Copy link
Contributor

Left a comment at #13113

@mattab
Copy link
Member

mattab commented Jul 24, 2018

@sgiehl do you maybe have an idea about how to fix #11806 which is similar?

@mattab
Copy link
Member

mattab commented Aug 1, 2018

Shouldn't the parameter be encoded automatically in ajax requests?

Yes, but then i see this code:


        // we took care of encoding &segment properly already, so we don't use $.param for it ($.param URL encodes the values)
        if(parameters['segment']) {
            url += 'segment=' + parameters['segment'] + '&';
            delete parameters['segment'];
        }

so the segment parameter is a special case/hack and not URL encoded as it's assumed by our Ajax helper that the value is already properly URL encoded. so URL encoding it manually as done in this PR is needed it seems...

@mattab mattab merged commit 4dcd5e1 into 3.x-dev Aug 1, 2018
@mattab mattab deleted the fixsegmentedlogwithspaces branch August 1, 2018 22:51
@eetasse
Copy link

eetasse commented Sep 20, 2018

hi guys, I have updated to 3.6 version a few weeks ago and I still experience this issue with URLs containing whitespaces. This is not clear if this PR is in 3.6 ? If yes so is it supposed to fix the issue ?
The Confluence URLs sent to Matomo contains initialy + (PLUS) chars. These chars are substituted with whitespaces later in Matomo. I did a very dirty workaround on the tracking client side javascript in replacing the PLUS chars with UNDERSCORE : then I am able to see the Visit Log but Confluence does not follow obviously the altered URLs. Any idea to workaround else ? Very thanks

@mattab
Copy link
Member

mattab commented Sep 20, 2018

It's supposed to work, please can you create new a issue? @eetasse

@fdellwing
Copy link
Contributor

See: #13460

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmented Visitor Log does not have data with Page Title containing whitespace (URL contains +)
5 participants