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
Fatal Error when trying to request historical data #3533
Comments
The method getKeywordsFromSearchEngineId doesn't handle datatable arrays correct. I'll fix that. Btw. calling this method that way doesn't make that much sense as the method only returns the requested subtable which means all other periods will stay empty. |
Stefan can you revert please? -> It does not work, by design, to call &idSubtable and also request multiple periods. the idSubtable is the id of the row in that particular archive, and wont work across dates. Thomas, can you check if the other reports work? I would expect them not to work for sub-tables using the &idSubtable... To fix this, proposal:
It will then work across archives/dates. It requires some code changes as I just tried and it does not work yet to set &label instead of &idSubtable. |
I wouldn't revert the change as it fixes a possible fatal which shouldn't occur - even if the call can't return any usefull data. |
Looks like graphs from other reports are not working either. I think it is only a problem when period!=range? Or also when period=range? BTW: Not only graph URLs are using "&idSubtable" + date range. Also a normal report is using &idSubtable since it is possible to select any date range for any subtable in Piwik Mobile. Period is "range" in this case and this seems to work fine. |
+1 for fixing the fatal error, maybe throwing an exception eg. "Unsupported parameter combination; try removing &idSubtable= or change the $date parameter" or similar message |
Replying to tsteur:
do you mean the graph generates? can you send me the URL of a graph generating with &idSubtable value? I would expect it not to work in all cases... |
This looks fixed |
Hi,
In Piwik Mobile I'm trying to open a graph within Search Engine Subtable and I get a fatal error. Almost all subtable evolution graphs are working except Search Engines. I'm not sure if other fail too.
Fatal error: Call to undefined method Piwik_DataTable_Array::getRowFromIdSubDataTable() in /home/piwik/www/demo.piwik.org/plugins/Referers/API.php on line 156
Graph URL:
http://demo.piwik.org/index.php?module=API&method=ImageGraph.get&idSite=7&apiModule=Referers&apiAction=getKeywordsFromSearchEngineId&token_auth=anonymous&period=year&date=2003-01-01,2012-12-31&idSubtable=1491&filter_sort_column=nb_visits&column=nb_visits&columns=nb_visits&token_auth=anonymous&idSite=7&language=en&
The ImageGraphEvolutionUrl is generated here:
http://demo.piwik.org/index.php?idSite=7&date=today&hideMetricsDoc=1&filter_sort_column=nb_visits&apiModule=Referers&apiAction=getKeywordsFromSearchEngineId&period=year&idSubtable=1490&filter_limit=30&module=API&token_auth=anonymous&format=json&method=API.getProcessedReport&language=en&
If you access the API directly you get the same error :
http://demo.piwik.org/index.php?module=API&method=Referers.getKeywordsFromSearchEngineId&idSite=7&token_auth=anonymous&period=year&date=2003-01-01,2012-12-31&idSubtable=1491
It should be possible to query this API with period=year&date=2003-01-01,2012-12-31 because it works for other reports such as getKeywords :
http://demo.piwik.org/index.php?module=API&method=Referers.getKeywords&idSite=7&token_auth=anonymous&period=year&date=2003-01-01,2012-12-31
The text was updated successfully, but these errors were encountered: