Bug #4065
open[ux, login] 404 on login after comment attempt
0%
Description
When I'm not logged in and attempt to comment on a line in a commit from the commit page, where the comment field would be is replaced by "You need to be logged in to comment. Login now". When I click the "Login now" link, I am directed to a 404 which says "No such commit exists for this repository".
I should be directed to the login page, with a redirect to the line I wanted to comment on after I log in.
"Login now" is producing this url:
http://dev-instance:5000/codysrepo/changeset/login_home?came_from=/codysrepo/changeset/5f9bc38085e8511830562edace00904669035195
Files
Updated by Lisa Quatmann over 8 years ago
{{rum(52, Martin Bornhold)}} says:
Look like trying to generate the url with pylons url instead of using pyramids
request.route_path
oderrequest.route_url
. Only a guess
Updated by Daniel D over 8 years ago
I came across same problems while doing integrations, my solution was to make both url() and request.route_url use the same function which would try both pyramid/pylons for the route:
pylons_router = URLGenerator(config['routes.map'], environ)
pyramid_router = request.route_url
def pyramid_pylons_url_for(*args, **kw):
try:
return pyramid_router(*args, **kw)
except (KeyError, TypeError):
return pylons_router(*args, **kw)
pylons.url._push_object(pyramid_pylons_url_for)
request.route_url = pyramid_pylons_url_for
Updated by Marcin Kuzminski [CTO] over 8 years ago
- Assignee set to Marcin Kuzminski [CTO]
Updated by Marcin Kuzminski [CTO] over 8 years ago
- Status changed from New to Resolved
fixed in: c62a25e206eb