some API methods (eg. Goals.getGoals, Live.getCounters) are broken for multiple idSites #8574
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone
Goals.getGoals selects all goals for multiple sites, but then it will put them in an array associating each goal by its idGoal. Since goal IDs are not unique across different sites, Goals.getGoals will end up overwriting goals of other sites and not returning all goals for all requested sites.
See for example:
http://demo.piwik.org/index.php?module=API&method=Goals.getGoals&format=XML&idSite=7&period=day&date=2015-07-15,2015-08-13&date=2015-07-15%2C2015-08-13&filter_limit=false&format_metrics=1&expanded=1&token_auth=anonymous&filter_limit=30
vs.
http://demo.piwik.org/index.php?module=API&method=Goals.getGoals&format=XML&idSite=all&period=day&date=2015-07-15,2015-08-13&date=2015-07-15%2C2015-08-13&filter_limit=false&format_metrics=1&expanded=1&token_auth=anonymous&filter_limit=30
The text was updated successfully, but these errors were encountered: