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

When Piwik is in maintenance mode, the API should return a valid response #7901

Closed
mattab opened this issue May 13, 2015 · 6 comments
Closed
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. worksforme The issue cannot be reproduced and things work as intended.

Comments

@mattab
Copy link
Member

mattab commented May 13, 2015

When Piwik is in maintenance mode, the API should return a valid response.

Reproduce:

  • Set Piwik in maintenance mode with maintenance_mode=1
  • Open index.php?module=API&method=API.getPiwikVersion&format=xml
  • Got: the API call returns the HTML page of the maintenance mode
  • Expected:
    • HTTP Status code 503,
    • and the API call returns a valid eg. XML response that returns the standard API error reponse eg.
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <error message="Piwik is undergoing maintenance. We will be back up and running again soon, so please try again later. Your analytics data will continue to be tracked as normal. Thank you for your patience." />
</result>

Steps:

  • Add test case
  • Fix issue

Refs #7902 #7903

@mattab mattab added the Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. label May 13, 2015
@mattab mattab modified the milestones: 3.0.0, 2.15.0 Jul 15, 2015
@tsteur
Copy link
Member

tsteur commented Jul 29, 2015

I tried to implement it but we'd need to load plugins in order to get an API renderer unless we hardcode the response for each possible API format.

@mattab
Copy link
Member Author

mattab commented Aug 9, 2015

in order to get an API renderer unless we hardcode the response for each possible API format.

Along with the response, we also need proper content-type http header. maybe we can manually use the API renderers objects, without having to load the plugins? or what would you suggest?

@tsteur
Copy link
Member

tsteur commented Aug 10, 2015

We'd have to hardcode this as well unless we load the plugins, then the ResponseBuilder takes care of headers.

I'm not sure what the best solution is but after discussing with @diosmosis it seems to be worth waiting for #8329 . Then we will no longer have to load plugins to get dimensions implemented by plugins.

@mattab
Copy link
Member Author

mattab commented Aug 10, 2015

if #8329 is merged in 2.15.0 we could fix this issue, otherwise we will move it to 3.0.0

@mattab
Copy link
Member Author

mattab commented Sep 15, 2015

as discussed, because #8329 was moved to 3.0.0 we also move this one

@mattab mattab modified the milestones: 3.0.0, 2.15.0 Sep 15, 2015
@mattab
Copy link
Member Author

mattab commented Dec 10, 2023

Fixed in the meantime

@mattab mattab closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2023
@sgiehl sgiehl added the worksforme The issue cannot be reproduced and things work as intended. label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants