Bug 1019860 - Job links are broken when using jobs/mine/ (rather than jobs/mine)
Job links are broken when using jobs/mine/ (rather than jobs/mine)
Status: NEW
Product: Beaker
Classification: Community
Component: web UI (Show other bugs)
0.14
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: beaker-dev-list
tools-bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-16 10:08 EDT by Jarod Wilson
Modified: 2016-05-26 09:31 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-06 20:41:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 2 Raymond Mancy 2013-10-16 20:56:11 EDT
We use relative URLs and so the trailing slash messes things up in that instance (and it other places I'm sure). I think that ideally CherryPy should just return a 404 if you go to jobs/mine/, but it doesn't. I'm not sure if there is a way to make it do so.

AFAIK werkzeug routes (that we use with Flask now) would return a 404, but the jobs/mine handler is not using this yet.
Comment 3 Nick Coghlan 2013-10-16 21:03:49 EDT
The relative job URLs on the My Jobs page (<site>/jobs/mine/) are not generated correctly when the trailing slash is included in the page URL: they look like "<site>/jobs/mine/<job number>" rather than the desired "<site>/jobs/<job number>".

The problem actually appears to affect all relative URLs on the page, including the search link (which also adds an extra "/mine/" segment).

These broken URLs then trigger a 500 error when attempting to load them (likely due to the page attempting to interpret the mangled additions as search criteria).
Comment 4 Nick Coghlan 2013-10-16 21:06:41 EDT
Since Flask is the default WSGI handler now, we should be able to deal more systematically with trailing slashes (likely by automatically removing them, as that will avoid breaking currently working bookmarks)
Comment 5 Nick Coghlan 2013-10-16 21:07:09 EDT
(Where by "now" I mean, in Beaker 0.15+)
Comment 7 Nick Coghlan 2014-02-06 20:41:03 EST
The upgrade to Flask actually fixed this.
Comment 8 Nick Coghlan 2014-02-07 00:06:10 EST
Sorry, misread the bug. Fixing the title :)
Comment 9 Dan Callaghan 2014-10-13 00:45:38 EDT
Fixing this requires porting those pages away from TurboGears to use a Backgrid, which is finally *possible* as of Beaker 19, but it won't make it into this release. We'll get there eventually...

Note You need to log in before you can comment on or make changes to this bug.