This is a follow-on from http://drupal.org/node/58034 - where it was discussed that the 'content' (or q=node) link should not appear by default in the breadcrumbs for node pages. Attached patch fixes this behaviour, by changing the 'node' menu item from a MENU_SUGGESTED_ITEM to a MENU_MODIFIABLE_BY_ADMIN item (the latter is the same as the former, except that it does not include the MENU_VISIBLE_IN_BREADCRUMB directive).

The problem, IMHO, is not that MENU_SUGGESTED_ITEM menu items should not appear in breadcrumbs - the patch that made such items appear in breadcrumbs needed to go in. The problem is that the 'node' menu item is a special case, and that it should not be a MENU_SUGGESTED_ITEM because of this.

CommentFileSizeAuthor
node_page_menu_item.patch766 bytesJaza
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jaza’s picture

The above patch currently works with HEAD and with the DRUPAL-4-7 branch, and should IMO be committed to both.

venkat-rk’s picture

Oh, so it's a bit of a bug then. I was tearing my hair out yesterday wondering why on earth 'content' appeared in the breadcrumb on node view.

moshe weitzman’s picture

nice. finally someone who knows what they are talking about. tested and verified to fix the issue.

Zen’s picture

+1 But, please note that enabling the content menu item will pop the item in the breadcrumb anyways. So, if the expected behaviour of this patch is that "content" is never displayed in the breadcrumb (even when the *menu* item is enabled, it fails in that respect. On the other hand, this patch will revert the status of the "content" breadcrumb to how it was before #58034. Jaza, what do you think?

@Moshe: Please be civil. Such grandiose statements don't help anything or anybody.

Thanks
-K

Jaza’s picture

@Zen: yes, I'm aware of the fact that the breadcrumb will appear if the user manually enables the 'content' menu item, and that this is how the 'content' menu item used to behave. I think it's important that users still have a choice: they can either have the 'content' link appear in their breadcrumbs, or they can have it not appear. All that this patch does, is it effectively swaps around the default option and the non-default option.

Thanks for the testing, guys. Looks like it's still RTBC. :-)

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Comitted to HEAD.

venkat-rk’s picture

This patch doesn't seem have to made it to the 4.7 tarball I just downloaded. I still get the Home>>content links.

I notice that the fix is for HEAD. Does this mean it won't be applied to 4.7? If so, can someone suggest a way to solve this without applying the patch?

killes@www.drop.org’s picture

The patch was applied to the 4.7 branch as well and will be in 4.7.1.

venkat-rk’s picture

Thanks for the clarification. I just realised from #5 that I have to disable content in the menu. Sorry for the bother.

Anonymous’s picture

Status: Fixed » Closed (fixed)