Skip to content

Commit 5e1d08c

Browse files
committed
fix metadata problem for goal reports
1 parent 432ad26 commit 5e1d08c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

core/API/DataTableManipulator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ private function getApiMethodForSubtable($request)
162162

163163
$meta = API::getInstance()->getMetadata($idSite, $this->apiModule, $this->apiMethod, $apiParameters);
164164

165+
if (empty($meta) && array_key_exists('idGoal', $apiParameters)) {
166+
unset($apiParameters['idGoal']);
167+
$meta = API::getInstance()->getMetadata($idSite, $this->apiModule, $this->apiMethod, $apiParameters);
168+
}
169+
165170
if (empty($meta)) {
166171
throw new Exception(sprintf(
167172
"The DataTable cannot be manipulated: Metadata for report %s.%s could not be found. You can define the metadata in a hook, see example at: http://developer.piwik.org/api-reference/events#apigetreportmetadata",

0 commit comments

Comments
 (0)