diff options
author | sgiehl <stefan@piwik.org> | 2016-04-03 22:29:19 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2016-04-03 22:29:19 +0300 |
commit | 5e1d08c2bb54da17ca143b2bcc54ce9d986a1875 (patch) | |
tree | 8db3705ea9a5600c7a48ccbb7816e7c3f030f7a6 /core | |
parent | 432ad26af6765afa9459645c1c5dc9870b1a2f8f (diff) |
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", |