Project

General

Profile

Actions

Bug #4065

open

[ux, login] 404 on login after comment attempt

Added by Lisa Quatmann over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
Start date:
30.06.2016
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

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

Actions #1

Updated by Lisa Quatmann over 7 years ago

{{rum(52, Martin Bornhold)}} says:

Look like trying to generate the url with pylons url instead of using pyramids request.route_pathoder request.route_url. Only a guess

Actions #2

Updated by Daniel D over 7 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

https://internal-code.rhodecode.com/u/dan/rhodecode-enterprise-ce-fork/files/43b67b32eccfbfbb8c48e296415009777c142cef/rhodecode/tweens.py#L56

Actions #3

Updated by Marcin Kuzminski [CTO] over 7 years ago

  • Assignee set to Marcin Kuzminski [CTO]
Actions #4

Updated by Marcin Kuzminski [CTO] over 7 years ago

  • Status changed from New to Resolved

fixed in: c62a25e206eb

Actions

Also available in: Atom PDF