@mgazdzik opened this Issue on March 7th 2014 Contributor

Using latest stable Piwik version (2.1.0) we found following bug in segments processing in UI. It basically comes to redundant url-decoding action during display of segmented widgets. Basically it works like that:

  • browser archiving is disabled, also browser_archiving_disabled_enforce is set to 1
  • segments are pre-processed with cron archiving
  • define 2 segments (set them to process via cron in editor), for example: test1 = pageTitle!=aaaaaa, test2=pageTitle!=aaaaaa bbbbbbbb
  • track some visits (I used visitor generator)
  • run archive.php
  • visits are archived, segments are recognized and calculated
  • log into dashboard, select segment test1 (without space) - on Visits Over Time you can see that there are some visits calculated.
    Select test2(with space in content) - you'll notice that graph is empty.

Moving deeper into this specific segment with space showing no data for dashboard, showed that if you enter Visitors Overview - you actually get graph displaying proper visits.

Here are segment strings copied from export to xml link for dashboard and Visitors Overview
dashboard: pageTitle!%3Daaaaaa%2520bbbbbbbb
visitors overview: pageTitle!=aaaaaa bbbbbbbb

that brings me to conclusion that segment string from UI request isn't passed well to API request for given widget in dashboard?
Keywords: segment, cron archive

@mattab commented on March 16th 2014 Member
@mattab commented on March 16th 2014 Member

Wrong fix + needs tests

@mattab commented on March 17th 2014 Member

In de8c6053897e758c677f1482c2db72c58b4973e5: Refs #4827 Adding test case: segment is pre-processed, and test both cases: with, or without URL encoding

@mattab commented on March 17th 2014 Member

In a6963a94546f15a0ee2ca83bf95d7549d117d39f: Refs #4827 Forgot to commit test fixture changes

@mattab commented on May 6th 2014 Member

Problem is fixed. tests are still not running so leaving ticket opened

Todo:

@mattab commented on December 1st 2014 Member

This should mostly work now. There are still tests to be un-commented in: https://github.com/piwik/piwik/blob/master/tests/PHPUnit/System/ArchiveCronTest.php#L32-65 I've created an issue to look into: Activate all CronArchive system tests #6753

@iMarkus commented on November 28th 2016 Contributor

Hi,
we are currently facing such issues with Piwik 2.16.2

The widgets do not show any contents when the following segment is used:

pageUrl=@site.domain.com%2Flocation%2Fxyz%2Fen-us%2Forg%2Faaa%2Fbbb%20ccc%20ddd%20eee

but it displays data when using:

pageUrl=^site.domain.com%2Flocation%2Fwxyz%2Fen-us%2Forg%2Faaa%2Fbbb

It looks like %20 is not working correctly for segmentation. Also exact matches with blanks in the URL are not working. Example:

pageUrl==site.domain.com%2flocation%2fxyz%2fen-us%2forg%2faaa%2fbbb%20ccc%20ddd%20eee%2fpages%2ftools.aspx

we also tried to use + instead of %20 with no difference

pageUrl==site.domain.com%2flocation%2fxyz%2fen-us%2forg%2faaa%2fbbb+ccc+ddd+eee%2fpages%2ftools.aspx

@mattab commented on December 6th 2016 Member

Hi @iMarkus Thanks for the report! since this issue is already closed, could you please copy it in a new issue?

@iMarkus commented on December 6th 2016 Contributor

Hi mattab,

as we are piwik pro customers i opened a ticket.

Regards,
Markus

This Issue was closed on December 1st 2014
Powered by GitHub Issue Mirror