Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Trying to add two strings values in DataTable\Row::sumRowArray #4706

Closed
anonymous-piwik-user opened this Issue · 30 comments

6 participants

@anonymous-piwik-user

Hi,
I'm trying to migrate an existing Piwik installation with HHVM but I'm getting the following Error when I click on some Menu Item.

Ajax call URL: piwik/index.php?date=last7&module=Actions&action=indexEntryPageUrls&period=range&idSite=5

Error:

WARN Actions19:45:51 [1f164] Failed to get data from API: Trying to add two strings values in DataTable\Row::sumRowArray: '4.081' + '13.145'
0 /var/www/main/piwik/core/DataTable/Row.php(505): Piwik\DataTable\Row->sumRowArray()
1 /var/www/main/piwik/core/DataTable/Row.php(473): Piwik\DataTable\Row->getColumnValuesMerged()
2 /var/www/main/piwik/core/DataTable.php(1603): Piwik\DataTable\Row->sumRow()
3 /var/www/main/piwik/core/DataTable.php(486): Piwik\DataTable->aggregateRowWithLabel()
4 /var/www/main/piwik/core/ArchiveProcessor.php(423): Piwik\DataTable->addDataTable()
5 /var/www/main/piwik/core/ArchiveProcessor.php(405): Piwik\ArchiveProcessor->aggregatedDataTableMapsAsOne()
6 /var/www/main/piwik/core/ArchiveProcessor.php(328): Piwik\ArchiveProcessor->getAggregatedDataTableMap()
7 /var/www/main/piwik/core/ArchiveProcessor.php(204): Piwik\ArchiveProcessor->aggregateDataTableRecord()
8 /var/www/main/piwik/plugins/Actions/Archiver.php(536): Piwik\ArchiveProcessor->aggregateDataTableRecords()
9 /var/www/main/piwik/core/ArchiveProcessor/PluginsArchiver.php(97): Piwik\Plugins\Actions\Archiver->aggregateMultipleReports()
10 /var/www/main/piwik/core/ArchiveProcessor/Loader.php(120): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateAllPlugins()
11 /var/www/main/piwik/core/ArchiveProcessor/Loader.php(74): Piwik\ArchiveProcessor\Loader->prepareAllPluginsArchive()
12 /var/www/main/piwik/core/Archive.php(793): Piwik\ArchiveProcessor\Loader->prepareArchive()
13 /var/www/main/piwik/core/Archive.php(612): Piwik\Archive->prepareArchive()
14 /var/www/main/piwik/core/Archive.php(554): Piwik\Archive->cacheArchiveIdsAfterLaunching()
15 /var/www/main/piwik/core/Archive.php(494): Piwik\Archive->getArchiveIds()
16 /var/www/main/piwik/core/Archive.php(343): Piwik\Archive->get()
17 /var/www/main/piwik/core/ArchiveProcessor.php(446): Piwik\Archive->getDataTableFromNumeric()
18 /var/www/main/piwik/core/ArchiveProcessor.php(239): Piwik\ArchiveProcessor->getAggregatedNumericMetrics()
19 /var/www/main/piwik/core/ArchiveProcessor/PluginsArchiver.php(183): Piwik\ArchiveProcessor->aggregateNumericMetrics()
20 /var/www/main/piwik/core/ArchiveProcessor/PluginsArchiver.php(64): Piwik\ArchiveProcessor\PluginsArchiver->aggregateMultipleVisitsMetrics()
21 /var/www/main/piwik/core/ArchiveProcessor/Loader.php(98): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateCoreMetrics()
22 /var/www/main/piwik/core/ArchiveProcessor/Loader.php(73): Piwik\ArchiveProcessor\Loader->prepareCoreMetricsArchive()
23 /var/www/main/piwik/core/Archive.php(793): Piwik\ArchiveProcessor\Loader->prepareArchive()
24 /var/www/main/piwik/core/Archive.php(612): Piwik\Archive->prepareArchive()
25 /var/www/main/piwik/core/Archive.php(554): Piwik\Archive->cacheArchiveIdsAfterLaunching()
26 /var/www/main/piwik/core/Archive.php(494): Piwik\Archive->getArchiveIds()
27 /var/www/main/piwik/core/Archive.php(370): Piwik\Archive->get()
28 /var/www/main/piwik/core/Archive.php(456): Piwik\Archive->getDataTable()
29 /var/www/main/piwik/plugins/Actions/API.php(126): Piwik\Archive::getDataTableFromArchive()
30 /var/www/main/piwik/plugins/Actions/API.php(186): Piwik\Plugins\Actions\API->getPageUrls()
31 (): Piwik\Plugins\Actions\API->getEntryPageUrls()
32 /var/www/main/piwik/core/API/Proxy.php(213): call_user_func_array()
33 /var/www/main/piwik/core/API/Request.php(220): Piwik\API\Proxy->call()
34 /var/www/main/piwik/core/ViewDataTable/Request.php(50): Piwik\API\Request->process()
35 /var/www/main/piwik/core/Plugin/ViewDataTable.php(275): Piwik\ViewDataTable\Request->loadDataTableFromAPI()
36 /var/www/main/piwik/core/Plugin/Visualization.php(168): Piwik\Plugin\ViewDataTable->loadDataTableFromAPI()
37 /var/www/main/piwik/core/Plugin/ViewDataTable.php(362): Piwik\Plugin\Visualization->buildView()
38 /var/www/main/piwik/core/Plugin/Controller.php(230): Piwik\Plugin\ViewDataTable->render()
39 /var/www/main/piwik/plugins/Actions/Controller.php(97): Piwik\Plugin\Controller->renderReport()
40 /var/www/main/piwik/plugins/Actions/Controller.php(39): Piwik\Plugins\Actions\Controller->getEntryPageUrls()
41 (): Piwik\Plugins\Actions\Controller->indexEntryPageUrls()
42 /var/www/main/piwik/core/FrontController.php(117): call_user_func_array()
43 /var/www/main/piwik/index.php(62): Piwik\FrontController->dispatch()
44 {main}
Keywords: HHVM

@mattab
Owner

which version of Piwik are you using? please try 2.1 RC http://forum.piwik.org/read.php?2,111814

@anonymous-piwik-user

I now installed 2.1 RC8 but this Problem already exists.

After the login I only see this page:
[[Image(http://s7.directupload.net/images/140221/dnde3yem.png)]]

@mattab
Owner

I don't think it's related to HHVM though? can you disable HHVM and try if you have the problem without it also?

@anonymous-piwik-user

Today I got it working without HHVM. So maybe you are using a function or something that isn't supported by HHVM yet.
Great pity, I was looking forwad to have a really fast Piwik ;)

@mattab
Owner

Thanks for testing Piwik with HHVM! I close this ticket but we would like to fix the issue ultimately. We created another ticket about running Piwik on HHVM: #4415

please comment there if you make new tests and have more feedback. Cheers!

@mattab
Owner

Reopening as this bug was also reported without HHVM on the forum: http://forum.piwik.org/read.php?2,114885

@anonymous-piwik-user

Hi! after update to 2.2.1 from 2.2.0 i get this error

API returned an error: Trying to add two strings values in DataTable\Row::sumRowArray: '85,71%' + '85,71%' at Row.php:581
error in Report Generation to email or if i attempt get report manual pdf or html format.

My system:
CentOS release 6.5 (Final)
2.6.32-431.11.2.el6.x86_64

RPMs:
php-cli-5.4.26-1.el6.remi.x86_64
php-pdo-5.4.26-1.el6.remi.x86_64
php-pear-1.9.4-23.el6.remi.noarch
php-mysql-5.4.26-1.el6.remi.x86_64
php-5.4.26-1.el6.remi.x86_64
php-common-5.4.26-1.el6.remi.x86_64
php-process-5.4.26-1.el6.remi.x86_64
php-xml-5.4.26-1.el6.remi.x86_64
php-gd-5.4.26-1.el6.remi.x86_64
php-pecl-geoip-1.0.8-6.el6.remi.5.4.x86_64
php-mbstring-5.4.26-1.el6.remi.x86_64

i have last geoip db from http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

and i post massage in http://forum.piwik.org/read.php?2,114885

Plz help.

@anonymous-piwik-user

2.2.0 installed get always this error on detail log

WARN Live16:42:55 [Failed to get data from API: Trying to add two strings values in DataTable\Row::sumRowArray: '^=' + 'QVp '#0 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/DataTable/Row.php(501): Piwik\DataTable\Row->sumRowArray('??^???=', 'QV?p?? ?')#1 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/DataTable/Row.php(469): Piwik\DataTable\Row->getColumnValuesMerged('sum', '??^???=', 'QV?p?? ?')#2 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/DataTable/Filter/Truncate.php(105): Piwik\DataTable\Row->sumRow(Object(Piwik\DataTable\Row), false, false)#3 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/DataTable/Filter/Truncate.php(72): Piwik\DataTable\Filter\Truncate->addSummaryRow(Object(Piwik\DataTable))#4 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/DataTable.php(426): Piwik\DataTable\Filter\Truncate->filter(Object(Piwik\DataTable))#5 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/API/DataTableGenericFilter.php(143): Piwik\DataTable->filter('Truncate', Array)#6 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/API/DataTableGenericFilter.php(37): Piwik\API\DataTableGenericFilter->applyGenericFilters(Object(Piwik\DataTable))#7 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/Plugin/Visualization.php(561): Piwik\API\DataTableGenericFilter->filter(Object(Piwik\DataTable))#8 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/Plugin/Visualization.php(314): Piwik\Plugin\Visualization->applyGenericFilters()#9 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/Plugin/Visualization.php(171): Piwik\Plugin\Visualization->applyFilters()#10 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/Plugin/ViewDataTable.php(375): Piwik\Plugin\Visualization->buildView()#11 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/Plugin/Controller.php(281): Piwik\Plugin\ViewDataTable->render()#12 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/plugins/Live/Controller.php(93): Piwik\Plugin\Controller->renderReport('getLastVisitsDe...')#13 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/plugins/Live/Controller.php(101): Piwik\Plugins\Live\Controller->getLastVisitsDetails()#14 internal function: Piwik\Plugins\Live\Controller->getVisitorLog()#15 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/FrontController.php(500): call_user_func_array(Array, Array)#16 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/FrontController.php(85): Piwik\FrontController->doDispatch(NULL, NULL, NULL)#17 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/core/dispatch.php(34): Piwik\FrontController->dispatch()#18 /kunden/254597_6130/rp-hosting/KunNr00040/AufNr00093/k2/piwik/index.php(47): require_once('/kunden/254597_...')#19 {main}

@tsteur
Owner

In 00e6361: refs #4706 better error message, might help us to find this issue

@tsteur
Owner

Can anyone who experiences this issue send us access to his Piwik server (ftp) and the actual Piwik installation (view permission should be enough)? I'd really like to debug this issue but need your help as I cannot reproduce it.

If so, please send us an email to 'hello @ piwik.org' and leave a comment here so we can check the spam folder if needed. That would be great!

@tsteur
Owner

In f008cad: refs #4706 while having a look on this issue I noticed another issue with this method. There were codepaths that were never reached. For instance if columnToSumValue is a string the check for being false as well cannot work

@mattab
Owner

In ccf13b8: Small refactor refs #4706

@anonymous-piwik-user

after update to 2.2.2 the problem persists

@mnlipp

I can confirm this problem, cronjob reports:

ERROR 23:07:54 [xxxxx] Got invalid response from API request: http://xxxxxxxxx/piwik/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=xxxxxxxxxx&trigger=archivephp. Response was 'task,output API.sendReport_1,"ERROR: API returned an error: Trying to add two strings values in DataTable\Row::sumRowArray: '33,33%' + '0%' at Row.php:581 "'
ERROR 23:07:54 [xxxxx] 1 total errors during this script execution, please investigate and try and fix these errors.

It started after update to 2.2.2 (I think from 2.2.1, although I'm not perfectly sure, but usually I check for updates at least once a week).

@anonymous-piwik-user

I get the same error (PIWIK 2.2.2):

ERROR 04:41:20 [Got invalid response from API request: DOMAIN/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=[TOKEN]&trigger=archivephp. Response was 'task,output API.sendReport_3,ERROR: API returned an error: Trying to add two strings values in DataTable\Row::sumRowArray: '40%' + '0%' at Row.php:581 '
ERROR 04:41:20 [5257a] 1 total errors during this script execution, please investigate and try and fix these errors.

In every Report, you can choose the "Statistics included". If I choose in the report one of the following statistics, I get the error message:

  • Visitor Settings
    • Screen Resolution
    • Browser Version
    • Visitor Configuration
    • Browser language
  • Referrers
    • All Referrers
    • Keywords
    • Websites
  • Visitors
    • Region
    • City
  • Visitor Devices
    • Browser versions

If I dont choose one of theses statistics, but all the other statistics, i dont get an error message and the report were sent.

@tsteur
Owner

In 1fbb453: refs #4706 added possibility to register a closure or a callable method to process processed metrics as late as possible and to make sure it always returns the correct value whenever it is called. Otherwise the value does not get updated in case for instance the nb_visits column changes (done in SumRow). Whenever there is a column that is not numeric and not the label column it should use a callback method instead of calculating the value directly to make sure the correct value is returend when using flat or truncate or ...

@tsteur
Owner

In bbe0304: refs #4706 fix sort test

@tsteur
Owner

In b4d1ff0: refs #4706 prevent sumRowArray exception in Live API

@tsteur
Owner

In 1127485: refs #4706 added some tests for Row class

@mattab
Owner

So many users have reported this bug over the last few days since 2.2.2 release.

Marking as closed as I don't see the error anymore.

Very nice work Thomas!

@anonymous-piwik-user

when the problem will solve?
after update to 2.2.2 the problem persists

@mattab
Owner

Problem is solved in the latest beta version, please upgrade: http://piwik.org/faq/how-to-update/faq_159/

@anonymous-piwik-user

I would not like to install the beta version. When the release 2.2.3?

@anonymous-piwik-user

Me too, I won't install a beta on client computers. A quick release of 2.2.3 is needed.

@mdawart

same here.

@mattab
Owner

2.3.0 Release candidate has been released! the final release is due on Monday.

@mattab
Owner

see #4415 Test if Piwik runs with HipHop Virtual Machine

@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #4706 while having a look on this issue I noticed another issue …
…with this method. There were codepaths that were never reached. For instance if columnToSumValue is a string the check for being false as well cannot work
f008cad
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@mattab mattab Small refactor refs #4706 ccf13b8
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #4706 added possibility to register a closure or a callable meth…
…od to process processed metrics as late as possible and to make sure it always returns the correct value whenever it is called. Otherwise the value does not get updated in case for instance the nb_visits column changes (done in SumRow). Whenever there is a column that is not numeric and not the label column it should use a callback method instead of calculating the value directly to make sure the correct value is returend when using flat or truncate or ...
1fbb453
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #4706 fix sort test bbe0304
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #4706 prevent sumRowArray exception in Live API b4d1ff0
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #4706 added some tests for Row class 1127485
@vamshikurra

Just want to know, is this issue resolved?

@tsteur
Owner

I think it was resolved but it seems to occur again sometimes because of any recent change see #6485 .

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.