Skip to content
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

SitesManager.updateSite succeeds for unknown idsite #1585

Closed
anonymous-matomo-user opened this issue Aug 14, 2010 · 5 comments
Closed

SitesManager.updateSite succeeds for unknown idsite #1585

anonymous-matomo-user opened this issue Aug 14, 2010 · 5 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

The response for SitesManager.updateSite is wrong. Calling it with an unknown idSite parameter results in

{"result":"success", "message":"ok"}

http://example.com/?module=API&idSite=124&format=JSON&token_auth=YOUR_TOKEN&method=SitesManager.updateSite&idSite=124&siteName=foo&urls=http%3A%2F%2Fwhatever.com

This makes no sense - and can't IMHO not be deserved, as delteSite returns

{"result":"error", "message":"website id = 124 not found"}

on error.

Thanks for your work!
Steffen

@anonymous-matomo-user
Copy link
Author

Attachment: Patch file
1585.diff

@anonymous-matomo-user
Copy link
Author

To may be speed it up a bit and make your life easier :) I've attached a patch, which adds the same check, which is also done in deleteSite()

@robocoder
Copy link
Contributor

Thanks, but getAllSitesId() requires superuser access. Some refactoring needs to be done.

@robocoder
Copy link
Contributor

(In [2928]) fixes #1585

@robocoder
Copy link
Contributor

(In [2977]) refs #1585, refs #1638 - merged from trunk

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik 0.9.9 - Stable release milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants