Ever since the amazing and beautiful Views UI was merged into Views 7.x-3.x dev, the Views breadcrumb link is no longer available when editing Views.

Instead of:
Home » Administration » Structure » Views

It is displaying:
Home » Administration » Structure

It seems silly but I find myself constantly trying to navigate back to the admin/structure/views using the Views breadcrumb link though it is no longer there. Is there any chance that this little breadcrumb can be re-added eventually? Many thanks!

CommentFileSizeAuthor
missing_views_breadcrumb.png15.83 KBjcarlson34

Comments

merlinofchaos’s picture

There seems to be a bug in the core menu system that I can't figure out.

Fresh installs have the breadcrumb correct, but some upgraded systems do not and no amount of menu rebuilding seems to get it right. I'd hoped that deleting the contents of menu_router and menu_links would do it, but there's something else not right.

I guess I'm going to have to get deep into menu's guts to figure out what's wrong.

jcarlson34’s picture

Your mention of the menu_links tables sent me to a potential fix.

On fresh installs, the admin/structure/views/view/% entry in the 'link_path' field of the 'menu_links' table has a 'depth' field of 4 and its own plid number in the 'p4' field.

On upgrades, the admin/structure/views/view/% entry has a depth of 3 and has a 0 entry for the p4 field.

After changing the older install's depth to 4, adding the plid, and clearing Drupal's cache, the Views breadcrumb link came back again.

jcarlson34’s picture

Status: Active » Needs review

Changing the status of this issue to 'needs review'.

merlinofchaos’s picture

Status: Needs review » Active

'needs review' would indicate there's a patch to test. There is no patch here.

So while investigating this, the site that I have that was exhibiting this behavior stopped exhibiting it partway through. Eventually a menu rebuild set it right.

Naturally I didn't keep a database that exhibits the behavior, so now I can't recreate the problem. :/

merlinofchaos’s picture

Status: Active » Fixed

Ok, losing that database might've been a good thing. It got me thinking about how this might've happened in the first place, and I figured it out. I sucessfully recreated an install in this condition.

Knowing that led me to a fix, which is an update function that will remove the condition. The latest CTools -dev fixes the code that causes the condition.

jcarlson34’s picture

merlin you rock. thanks for the fix!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

prossel’s picture

Had the same problem. Comment #2 lead me to the solution, but I also had the wrong plid for many of the "admin/structure/views..." entries. By comparing with a fresh install, I have been able to understand which one related to which one and fix them manually.

Easy way to view only the relevant rows:

SELECT mlid, plid, link_path, depth, p1, p2, p3, p4, p5 FROM menu_links WHERE link_path LIKE "admin/structure/views%"

Then verify each plid value. It should point to the mlid whose link_path matches the parent folder of the link_path field.

mmlmitchell’s picture

Issue summary: View changes

I understand this issue to be a persistent problem with 7.X core. 5 years on, it still lurks. The suggested solutions in #2 and #8 dissolve when the database is updated (drush updb). I know I have fixed this issue on previous sites, but the solution eludes me now. Any advice?