Breadcrumbs ignore PrefixMiddleware

Bug #268867 reported by Matt Nordhoff
2
Affects Status Importance Assigned to Milestone
loggerhead
Invalid
Undecided
Toshio Kuratomi

Bug Description

Hi, I'm using Loggerhead's trunk and serve-branches. I use PrefixMiddleware so Loggerhead is mounted on "/loggerhead/".

The new breadcrumbs stuff (revision 220 of the trunk) ignores PrefixMiddleware. As an example, say I'm at a directory listing at /loggerhead/foo/. The breadcrumb at the top will say "Browsing (root)/foo". "(root)" links to / instead of /loggerhead/, and "foo" links to "/foo" (which doesn't exist period) instead of "/loggerhead/foo".

BTW, once this is fixed, it should also be linking to "/loggerhead/foo/", with a trailing slash. If someone clicks on a link to "/loggerhead/foo", they'll just be redirected there.

Revision history for this message
Toshio Kuratomi (toshio) wrote :

Try the branch I just attached. It contains a single change to the breadcrumb template that seems to fix things here. Basically, it looks like urls that are strings are not modified by PrefixMiddleware. You have to use the python:url() function.

Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

That fixes it, but now there are other issues. (These issues may have been there before. I dunno, and I'm not bothering to check.)

On the root page, the "(root)" link is broken due to an exception. The logs have this to say:

2008-09-28 16:59:58,032 WARNING simpleTALES.Context: Exception occurred evaluating python path, exception: 'int' object is not callable

Also, on "/loggerhead/some/nested/branch/changes", "(root)", "some" and "nested" *all* link to "/loggerhead/some/nested/branch", while "branch" links to "/loggerhead/some/nested/branch/changes".

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Fixed on trunk, rev 227

Changed in loggerhead:
status: New → Fix Committed
Revision history for this message
Toshio Kuratomi (toshio) wrote :

This is broken at rev 227. for start-loggerhead and in my mod_wsgi branch based on rev 227 with or without webpath. Only server-branches (with or without --prefix) works at that revision.

start-loggerhead, without webpath I get breadcrumb URLs like this::
  http://localhost:8080/fedora-packagedb-sa0.4

They should be::
  http://localhost:8080/packagedb/fedora-packagedb-sa0.4

Changed in loggerhead:
status: Fix Committed → In Progress
Martin Albisetti (beuno)
Changed in loggerhead:
assignee: nobody → toshio
status: In Progress → Fix Committed
assignee: toshio → nobody
status: Fix Committed → In Progress
assignee: nobody → toshio
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

This is now a rather different bug, which is basically "we shouldn't use breadcrumbs with start-loggerhead" I think. I'll look at it next week...

Revision history for this message
Martin Albisetti (beuno) wrote :

I think this is invalid at this point. Please re-open otherwise.

Changed in loggerhead:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.