Opened 7 years ago
Closed 6 years ago
#3084 closed defect (bug) (worksforme)
Translate API endless loop
Reported by: | casiepa | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Translate Site & Plugins | Keywords: | |
Cc: |
Description
https://translate.wordpress.org/api/projects/wp is responding correctly
https://translate.wordpress.org/api/projects is not
It seems to go in an endless loop and then ends with an ERR_TOO_MANY_REDIRECTS
Attachments (1)
Change History (6)
#2
@
7 years ago
FWIW The redirect from /api/projects/
to /api/projects
is being triggered by redirect_canonical()
.
I can't trigger the /api/projects
to /api/projects/
in my development environment either, so I'm not sure what's up.
The /api/projects
route definitely isn't one we want to allow to be loaded though, as it causes OOM errors. IIRC we may have even disabled it directly - @ocean90 do you recall anything about this one?
#3
@
7 years ago
The API routes for projects are not disabled, see https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/class-plugin.php#L106. We probably should, /api/projects/wp-plugins
is killing it.
I couldn't reproduce this on my sandbox neither last time I checked. So maybe there's another redirect rule (nginx) somewhere. By default all URLs should be without a trailing slash.
@
6 years ago
The issue is still there. Opening https://translate.wordpress.org/api/projects/ in Firefox on Windows
Looks like it redirects to
/api/projects/
(note the trailing slash) and back to/api/projects
until the limit is reached. I'm not familiar with the API part of GlotPress yet, but sounds like a bug to me :) It should either display the projects or show an error, but not fall into an endless redirect loop.