Red Hat Bugzilla – Bug 1019860
Job links are broken when using jobs/mine/ (rather than jobs/mine)
Last modified: 2016-05-26 09:31:30 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.
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).
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)
(Where by "now" I mean, in Beaker 0.15+)
The upgrade to Flask actually fixed this.
Sorry, misread the bug. Fixing the title :)
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...