Anyone an idea? "The segment 'visitIp' is not valid."


#1

Hi all,

i created two segments to the ip of the visitors. (separation by www and private ip adresses).

The dashboard is working and looking fine.
But when i click on Visitors - Devices or overview or any other submenu - it says:
“The segment ‘visitIp’ is not valid.”

This is the complete error message:
WARN DevicesDetection[2014-06-06 07:54:18] [9a4a0] Failed to get data from API: The segment ‘visitIp’ is not valid.#0 /srv/www/mywebsite.de/core/Segment.php(108): Piwik\SegmentExpression->parseSubExpressions()#1 /srv/www/mywebsite.de/core/Segment.php(88): Piwik\Segment->initializeSegment(‘visitIp’, Array)#2 /srv/www/mywebsite.de/core/Archive.php(208): Piwik\Segment->__construct(‘visitIp’, Array)#3 /srv/www/mywebsite.de/plugins/DevicesDetection/API.php(34): Piwik\Archive::build(‘2’, ‘day’, ‘yesterday’, ‘visitIp’)#4 /srv/www/mywebsite.de/plugins/DevicesDetection/API.php(52): Piwik\Plugins\DevicesDetection\API->getDataTable(‘DevicesDetectio…’, ‘2’, ‘day’, ‘yesterday’, ‘visitIp’)#5 [internal function]: Piwik\Plugins\DevicesDetection\API->getType(‘2’, ‘day’, ‘yesterday’, ‘visitIp’)#6 /srv/www/mywebsite.de/core/API/Proxy.php(209): call_user_func_array(Array, Array)#7 /srv/www/mywebsite.de/core/API/Request.php(215): Piwik\API\Proxy->call(’\Piwik\Plugins…’, ‘getType’, Array)#8 /srv/www/mywebsite.de/core/ViewDataTable/Request.php(48): Piwik\API\Request->process()#9 /srv/www/mywebsite.de/core/Plugin/ViewDataTable.php(287): Piwik\ViewDataTable\Request->loadDataTableFromAPI(Array)#10 /srv/www/mywebsite.de/core/Plugin/Visualization.php(166): Piwik\Plugin\ViewDataTable->loadDataTableFromAPI(Array)#11 /srv/www/mywebsite.de/core/Plugin/ViewDataTable.php(374): Piwik\Plugin\Visualization->buildView()#12 /srv/www/mywebsite.de/core/Plugin/Controller.php(281): Piwik\Plugin\ViewDataTable->render()#13 /srv/www/mywebsite.de/plugins/DevicesDetection/Controller.php(34): Piwik\Plugin\Controller->renderReport(‘getType’)#14 /srv/www/mywebsite.de/plugins/DevicesDetection/Controller.php(24): Piwik\Plugins\DevicesDetection\Controller->getType(true)#15 [internal function]: Piwik\Plugins\DevicesDetection\Controller->index()#16 /srv/www/mywebsite.de/core/FrontController.php(500): call_user_func_array(Array, Array)#17 /srv/www/mywebsite.de/core/FrontController.php(85): Piwik\FrontController->doDispatch(NULL, NULL, NULL)#18 /srv/www/mywebsite.de/core/dispatch.php(34): Piwik\FrontController->dispatch()#19 /srv/www/mywebsite.de/index.php(47): require_once(’/srv/www/piwikl…’)#20 {main}

Whats wrong there? Anyone an idea? thank you!


(Matthieu Aubry) #2

Did you create the custom segment using the segment editor?

or did you manually add the value to the URL?

(Maybe you can solve the error by “URL Encoding” the segment value)


(Twan Meijerink) #3

Same here. Use a Internet Explorere browser 9 or 10 (IE11 works fine) on
https://demo.piwik.org/index.php?module=CoreHome&action=index&idSite=7&period=day&date=yesterday&segment=visitCount>%3D5%2Cactions>%3D10%3BcustomVariableName3%3D%3DForum%20status%3BcustomVariableValue3%3D%3DLoggedIn%20user#/module=Live&action=indexVisitorLog&idSite=7&period=day&date=yesterday&segment=visitCount>=5,actions>=10%3BcustomVariableName3==Forum%20status%3BcustomVariableValue3==LoggedIn%20user

you’ll see the error ERROR Live[2014-12-09 13:15:11] [1d09b] Failed to get data from API: The segment ‘visitCount&gt’ is not valid.#0 /home/piwik-demo/www/demo.piwik.org/core/Segment.php(121): Piwik\Segment\SegmentExpression->parseSubExpressions()#1 /home/piwik-demo/www/demo.piwik.org/core/Segment.php(101): Piwik\Segment->initializeSegment(‘visitCount>=…’, ‘7’)#2 /home/piwik-demo/www/demo.piwik.org/plugins/Live/Model.php(349): Piwik\Segment->__construct(‘visitCount>=…’, ‘7’)#3 /home/piwik-demo/www/demo.piwik.org/plugins/Live/Model.php(185): Piwik\Plugins\Live\Model->makeLogVisitsQueryString(‘7’, ‘day’, ‘yesterday’, ‘visitCount>=…’, 20, false, false, ‘desc’)#4 /home/piwik-demo/www/demo.piwik.org/plugins/Live/API.php(288): Piwik\Plugins\Live\Model->queryLogVisits(‘7’, ‘day’, ‘yesterday’, ‘visitCount>=…’, 20, false, false, ‘desc’)#5 /home/piwik-demo/www/demo.piwik.org/plugins/Live/API.php(122): Piwik\Plugins\Live\API->loadLastVisitorDetailsFromDatabase(‘7’, ‘day’, ‘yesterday’, ‘visitCount>=…’, 20, false, false, ‘desc’)#6 [internal function]: Piwik\Plugins\Live\API->getLastVisitsDetails(‘7’, ‘day’, ‘yesterday’, ‘visitCount>=…’, false, false, false, false)#7 /home/piwik-demo/www/demo.piwik.org/core/API/Proxy.php(211): call_user_func_array(Array, Array)#8 /home/piwik-demo/www/demo.piwik.org/core/API/Request.php(226): Piwik\API\Proxy->call(’\Piwik\Plugins…’, ‘getLastVisitsDe…’, Array)#9 /home/piwik-demo/www/demo.piwik.org/core/ViewDataTable/Request.php(48): Piwik\API\Request->process()#10 /home/piwik-demo/www/demo.piwik.org/core/Plugin/ViewDataTable.php(327): Piwik\ViewDataTable\Request->loadDataTableFromAPI(Array)#11 /home/piwik-demo/www/demo.piwik.org/core/Plugin/Visualization.php(176): Piwik\Plugin\ViewDataTable->loadDataTableFromAPI(Array)#12 /home/piwik-demo/www/demo.piwik.org/core/Plugin/ViewDataTable.php(414): Piwik\Plugin\Visualization->buildView()#13 /home/piwik-demo/www/demo.piwik.org/core/Plugin/Report.php(305): Piwik\Plugin\ViewDataTable->render()#14 /home/piwik-demo/www/demo.piwik.org/core/Plugin/Controller.php(329): Piwik\Plugin\Report->render()#15 /home/piwik-demo/www/demo.piwik.org/plugins/Live/Controller.php(60): Piwik\Plugin\Controller->renderReport(Object(Piwik\Plugins\Live\Reports\GetLastVisitsDetails))#16 [internal function]: Piwik\Plugins\Live\Controller->indexVisitorLog()#17 /home/piwik-demo/www/demo.piwik.org/core/FrontController.php(585): call_user_func_array(Array, Array)#18 /home/piwik-demo/www/demo.piwik.org/core/FrontController.php(97): Piwik\FrontController->doDispatch(NULL, NULL, NULL)#19 /home/piwik-demo/www/demo.piwik.org/core/dispatch.php(36): Piwik\FrontController->dispatch()#20 /home/piwik-demo/www/demo.piwik.org/index.php(46): require_once(’/home/piwik-dem…’)#21 {main}

Bezoekerslogboek

The segment ‘visitCount&gt’ is not valid.


#4

I have currently exactly same issue with Piwik 2.13.1. Customer reported they get error message with IE 10: “The segment ‘xxx&gt’ is not valid…”. Detailed error message below.

If I use newest Chrome or Firefox or IE 11 I can’t get any error messages. I even created new user account for tests which I and customer use. I cannot get error messages but customer will get. Customer cannot change browser or install any other browsers due policies.

Also reported that Piwik dashboard freeze sometimes with IE 10 which takes over 30 sec. Many of reports doesn’t show any data.

How this can be fixed?


ERROR CoreHome[2015-05-29 07:08:20] [29ce6] Failed to get data from API: The segment 'actions&lt' is not valid.
  #0 /var/www/piwik/core/Segment.php(121): Piwik\Segment\SegmentExpression->parseSubExpressions()
  #1 /var/www/piwik/core/Segment.php(101): Piwik\Segment->initializeSegment('actions<3', Array)
  #2 /var/www/piwik/core/Archive.php(219): Piwik\Segment->__construct('actions<3', Array)
  #3 /var/www/piwik/core/Archive.php(483): Piwik\Archive::build('2', 'month', '2015-04-08', 'actions<3', false)
  #4 /var/www/piwik/core/Archive.php(520): Piwik\Archive::getDataTableFromArchive('Actions_actions', '2', 'month', '2015-04-08', 'actions<3', false, false, NULL)
  #5 /var/www/piwik/plugins/Actions/API.php(181): Piwik\Archive::createDataTableFromArchive('Actions_actions', '2', 'month', '2015-04-08', 'actions<3', false, false, false)
  #6 [internal function]: Piwik\Plugins\Actions\API->getPageTitles('2', 'month', '2015-04-08', 'actions<3', false, false, false)
  #7 /var/www/piwik/core/API/Proxy.php(211): call_user_func_array(Array, Array)
  #8 /var/www/piwik/core/Plugin/Visualization.php(259): Piwik\API\Proxy->call('\Piwik\Plugins\...', 'getPageTitles', Array)
  #9 /var/www/piwik/core/Plugin/Visualization.php(180): Piwik\Plugin\Visualization->loadDataTableFromAPI()
  #10 /var/www/piwik/core/Plugin/ViewDataTable.php(414): Piwik\Plugin\Visualization->buildView()
  #11 /var/www/piwik/core/Plugin/Report.php(339): Piwik\Plugin\ViewDataTable->render()
  #12 /var/www/piwik/plugins/CoreHome/Controller.php(78): Piwik\Plugin\Report->render()
  #13 /var/www/piwik/plugins/CoreHome/Controller.php(66): Piwik\Plugins\CoreHome\Controller->renderReportWidget(Object(Piwik\Plugins\Actions\Reports\GetPageTitles))
  #14 [internal function]: Piwik\Plugins\CoreHome\Controller->renderReportMenu(Object(Piwik\Plugins\Actions\Reports\GetPageTitles))
  #15 /var/www/piwik/core/FrontController.php(531): call_user_func_array(Array, Array)
  #16 /var/www/piwik/core/FrontController.php(97): Piwik\FrontController->doDispatch(NULL, NULL, NULL)
  #17 /var/www/piwik/core/dispatch.php(31): Piwik\FrontController->dispatch()
  #18 /var/www/piwik/index.php(27): require_once('/var/www/piwik/...')
  #19 {main}


#5

Customer has possibility to tests with IE 11, but transition to use IE 11 in daily usage is very long. This is problem because it seems that Piwik 2.13.1 doesn’t work with IE 10.


(Matthieu Aubry) #6

Hi jarvija

It’s possible that Piwik Segments is broken with IE10. Please can you create an issue at: Issues · matomo-org/piwik · GitHub
with steps to reproduce the bug? we will investigate to make it work nicely with IE10


#7

Done. Segment doesn't work with IE 10 when containing lesser or greater than comparison · Issue #8077 · matomo-org/piwik · GitHub