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

When Piwik DB needs to be upgraded, the API should return a valid response #7902

mattab opened this Issue May 13, 2015 · 0 comments


None yet
2 participants

mattab commented May 13, 2015

When Piwik sourcecode file have been upgraded to a new version, and user has still not executed the core:update command (or clicked in the UI on Continue to execute the DB upgrades), then the API in the meantime should return a valid API response error.


  • Increase Piwik version number in Version.php
  • Create a fake update in core/Updates/*.php
  • Open index.php?module=API&method=API.getPiwikVersion&format=xml
  • Got: a 302 redirect to index.php?module=CoreUpdater&method=API.getPiwikVersion&format=xml&action=
  • Expected:
    • HTTP Status code 503,
    • and API call should not redirect. It should instead return a valid eg. XML response that returns the standard API error reponse eg.
<?xml version="1.0" encoding="utf-8" ?>
    <error message="Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue." />


  • Add test case
  • Fix issue

Related to #7901 #7903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment