I think I have a fix for issue2550785. It requires changing the
jinja2 navigation template to create two values for __came_from
in the login block.
The first value should include the base url, PATH_INFO and
QUERY_STRING if the QUERY_STRING is defined. If QUERY_STRING is
not defined set __came_from to the base url and PATH_INFO.
Arguably, you may be able to drop the base url from both of those
as long as the resulting url works as a redirect.
I did all the tal based templates, but I didn't want to
research how to do this in jinja since you guys
know some jinja and can probably knock this out easily.
If you have any questions, just ask.