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

Piwik 3.0.1 Segments with an OR not working #11170

Closed
robles-design opened this issue Jan 10, 2017 · 11 comments
Closed

Piwik 3.0.1 Segments with an OR not working #11170

robles-design opened this issue Jan 10, 2017 · 11 comments
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@robles-design
Copy link

I created a segment with an OR and get the following error:
The segment 'deviceType%3D%3DSmartphone%2CdeviceType%3D%3DTablet%2CdeviceType%3D%3DPhablet' is not valid.

When clicking on the admin panel after this message there is some more information:
ERROR: Failed to get data from API: The segment 'deviceType%3D%3DSmartphone%2CdeviceType%3D%3DTablet%2CdeviceType%3D%3DPhablet' is not valid. #0 /www/.../statistik/piwik/core/Segment.php(155): Piwik\Segment\SegmentExpression->parseSubExpressions() #1 /www/.../statistik/piwik/core/Segment.php(106): Piwik\Segment->initializeSegment('deviceType%253D...', Array) #2 /www/.../statistik/piwik/core/Archive.php(225): Piwik\Segment->__construct('deviceType%253D...', Array) #3 /www/.../statistik/piwik/core/Archive.php(459): Piwik\Archive::build('2', 'range', '2016-12-12,2017...', 'deviceType%253D...', false) #4 /www/.../statistik/piwik/plugins/Referrers/API.php(297): Piwik\Archive::createDataTableFromArchive('Referrers_urlBy...', '2', 'range', '2016-12-12,2017...', 'deviceType%253D...', false, false, NULL) #5 [internal function]: Piwik\Plugins\Referrers\API->getWebsites('2', 'range', '2016-12-12,2017...', 'deviceType%253D...', false, false) #6 /www/.../statistik/piwik/core/API/Proxy.php(219): call_user_func_array(Array, Array) #7 /www/.../statistik/piwik/core/Plugin/Visualization.php(264): Piwik\API\Proxy->call('\Piwik\Plugins\...', 'getWebsites', Array) #8 /www/.../statistik/piwik/core/Plugin/Visualization.php(181): Piwik\Plugin\Visualization->loadDataTableFromAPI() #9 /www/.../statistik/piwik/core/Plugin/Report.php(309): Piwik\Plugin\Visualization->render() #10 /www/.../statistik/piwik/plugins/CoreHome/Controller.php(59): Piwik\Plugin\Report->render() #11 [internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(Object(Piwik\Plugins\Referrers\Reports\GetWebsites)) #12 /www/.../statistik/piwik/core/FrontController.php(542): call_user_func_array(Array, Array) #13 /www/.../statistik/piwik/core/FrontController.php(137): Piwik\FrontController->doDispatch('Referrers', 'getWebsites', Array) #14 /www/.../statistik/piwik/core/dispatch.php(34): Piwik\FrontController->dispatch() #15 /www/.../statistik/piwik/index.php(27): require_once('/www/...') #16 {main}

In Piwik 2.x the segments with an OR worked. The issue started with Piwik 3.0.0. I deleted the segment and created a new one and tried different browsers, same error. Segments with an AND work well. Any idea?

@sezuan
Copy link

sezuan commented Jan 30, 2017

That's somewhat funny, for me, all AND segments are broken. I must edit and save them, then they work for the current session. After logout/login it's gonna be broken again.

Simple example:

Error: The segment 'referrerType%3D%3Dcampaign%3BreferrerName%3D%3DGOOGLE' is not valid.

@sgiehl
Copy link
Member

sgiehl commented Jan 30, 2017

Which browsers are you using? Can you reproduce that behavior in another browser?

@sezuan
Copy link

sezuan commented Jan 30, 2017

I tried Firefox and Vivaldi. Same result.

@OlafDoering
Copy link

I did a short test.
My segment is a long list of "or" statements.
Chrome is showing no accesses when selecting the segment. After editing the segment, correct accesses are shown.
Internet Explorer is showing all accesses after selecting the segment. After editing, it is showing some errors.

@sezuan
Copy link

sezuan commented Jan 30, 2017

After editing I got an error, too:

ERROR: Failed to get data from API: The segment 'referrerType%3D%3Dcampaign%3BreferrerName%3D%3DGOOGLE' is not valid. #0 /var/www/core/Segment.php(155): Piwik\Segment\SegmentExpression->parseSubExpressions() #1 /var/www/core/Segment.php(106): Piwik\Segment->initializeSegment('referrerType%25...', Array) #2 /var/www/core/Archive.php(225): Piwik\Segment->__construct('referrerType%25...', Array) #3 /var/www/plugins/Goals/API.php(433): Piwik\Archive::build('3', 'day', '2017-01-01,2017...', 'referrerType%25...') #4 [internal function]: Piwik\Plugins\Goals\API->getMetrics('3', 'day', '2017-01-01,2017...', 'referrerType%25...', 'ecommerceOrder', Array) #5 /var/www/core/API/Proxy.php(219): call_user_func_array(Array, Array) #6 /var/www/core/API/Request.php(236): Piwik\API\Proxy->call('\Piwik\Plugins...', 'getMetrics', Array) #7 /var/www/core/API/Request.php(398): Piwik\API\Request->process() #8 /var/www/plugins/Goals/API.php(406): Piwik\API\Request::processRequest('Goals.getMetric...', Array) #9 [internal function]: Piwik\Plugins\Goals\API->get('3', 'day', '2017-01-01,2017...', 'referrerType%25...', 'ecommerceOrder', Array) #10 /var/www/core/API/Proxy.php(219): call_user_func_array(Array, Array) #11 /var/www/core/Plugin/Visualization.php(264): Piwik\API\Proxy->call('\Piwik\Plugins...', 'get', Array) #12 /var/www/core/Plugin/Visualization.php(181): Piwik\Plugin\Visualization->loadDataTableFromAPI() #13 /var/www/core/Plugin/Controller.php(249): Piwik\Plugin\Visualization->render() #14 /var/www/plugins/Goals/Controller.php(226): Piwik\Plugin\Controller->renderView(Object(Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution)) #15 [internal function]: Piwik\Plugins\Goals\Controller->getEvolutionGraph() #16 /var/www/core/FrontController.php(542): call_user_func_array(Array, Array) #17 /var/www/core/FrontController.php(137): Piwik\FrontController->doDispatch(NULL, NULL, NULL) #18 /var/www/core/dispatch.php(34): Piwik\FrontController->dispatch() #19 /var/www/index.php(27): require_once('/var/www/core/d...') #20 {main}

@robles-design
Copy link
Author

Chromium, Firefox, Opera, Vivaldi and Otter on Linux.

@phip1611
Copy link

phip1611 commented Feb 5, 2017

this is probably not a problem of AND/OR but filtering for operating systems or device types in general! Device-Type-Filtering works for me but filtering for operating system does not: see: #11321

@sezuan
Copy link

sezuan commented Feb 7, 2017

I don't think so. My filter rule is simple, contains no operating system and filters only a certain campain and fails.

@tsteur
Copy link
Member

tsteur commented Feb 10, 2017

It may be related to #11321

@sezuan
Copy link

sezuan commented Feb 13, 2017

@tsteur Yes, that's possible.

@mattab
Copy link
Member

mattab commented Feb 20, 2017

Should be duplicate of #11321

@mattab mattab closed this as completed Feb 20, 2017
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

7 participants