diff options
author | Matthieu Aubry <matt@piwik.org> | 2016-04-07 04:01:38 +0300 |
---|---|---|
committer | Matthieu Aubry <matt@piwik.org> | 2016-04-07 04:01:38 +0300 |
commit | 0e85026f616cfb60baca6d4691992010d9b3d1ce (patch) | |
tree | e162771fcb648f6df4952891a1851cd4779197f8 /core | |
parent | a10cd72e45311f3ecd99aa26121d7e1bba0d15b7 (diff) | |
parent | 5e1d08c2bb54da17ca143b2bcc54ce9d986a1875 (diff) |
Merge pull request #9993 from piwik/9697
Fix metadata problem for goal reports
Diffstat (limited to 'core')
-rw-r--r-- | core/API/DataTableManipulator.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/API/DataTableManipulator.php b/core/API/DataTableManipulator.php index d084d6d156..7dad3b7a0d 100644 --- a/core/API/DataTableManipulator.php +++ b/core/API/DataTableManipulator.php @@ -162,6 +162,11 @@ abstract class DataTableManipulator $meta = API::getInstance()->getMetadata($idSite, $this->apiModule, $this->apiMethod, $apiParameters); + if (empty($meta) && array_key_exists('idGoal', $apiParameters)) { + unset($apiParameters['idGoal']); + $meta = API::getInstance()->getMetadata($idSite, $this->apiModule, $this->apiMethod, $apiParameters); + } + if (empty($meta)) { throw new Exception(sprintf( "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", |