Sometime during the Views sprint a few weeks ago we fixed some issues where Views wasn't showing its main breadcrumbs properly.
However, there are a couple less-visited places where the breadcrumbs still don't work correctly. On the clone/analyze/export/delete pages of a view, the breadcrumb says "Home".
This patch fixes that. Mostly it's just a straightforward change of menu callbacks to MENU_VISIBLE_IN_BREADCRUMB. I also had to move the title callback function to views_ui.module, though, so it's always actually loaded when it's needed for the breadcrumb (without that, Drupal unhelpfully just puts an empty entry inside the breadcrumb rather than failing with some kind of actual error, which made it a pain to track this issue down - see #1059884: Drop function_exists for 'callback' functions for the core issue that would fix that).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | views-edit-breadcrumbs.png | 28.4 KB | David_Rothstein |
| views-fix-breadcrumbs.patch | 3.35 KB | David_Rothstein |
Comments
Comment #1
merlinofchaos commentedI'm not sure this is enough. The 'edit' page is also not showing a proper breadcrumb at this time, and I fiddled with it for awhile and couldn't figure out how to fix it.
Comment #2
David_Rothstein commentedFor me the breadcrumbs on the edit page say "Home » Administration » Structure » Views" (see attached screenshot), which I think is correct. Do you see something different?
One thing I noticed while working on this was that it was possible to code yourself into a situation where even a cache clear did not make the menus match what was in the code. I actually had to uninstall and reinstall. So if you see something different than the above and haven't uninstalled in a while, maybe trying uninstalling Views+Ctools and starting again. It is kind of disturbing that can happen, though.
Comment #3
David_Rothstein commentedThough of course, uninstalling and reinstalling is not an option for someone with a real site upgrading from Drupal 6 :) I haven't checked at all what happens to the breadcrumbs in that case.
Comment #4
bojanz commentedYeah, I only see "Home » Administration » Structure" in the breadcrumb when editing a View. The install is less than a month old (3 weeks, I think), will try to reinstall...
Comment #5
merlinofchaos commentedI see the same as bojanz. This is a pretty old install, though.
I have seen places where hook_menu refuses to make changes to existing items. :/
Comment #6
dawehnerHere is a installation which was created after the codesprint and here the breadcrumb works fine.
Comment #7
bojanz commentedReinstalled, and the main breadcrumb is now good.
And David's patch fixes the other breadcrumbs. Yay!
Comment #8
merlinofchaos commentedCommitted, pushed out.