Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Somehow my breadcrumb only shows "Home > [Page Title]" when I'm logged in. After much investigation, I've narrowed it down to Node Block is the one causing the problem. The problem is pretty peculiar, the exact conditions are as follow:
- Menu-based breadcrumbs works fine with Omega subtheme when I'm not logged in.
- Custom Breadcrumbs doesn't work with Omega subtheme + Node Blocks. Custom Breadcrumbs will show if I disable Node Blocks module.
- The problem only occurs when I'm using a subtheme. Menu-based breadcrumbs and Custom Breadcrumbs works fine using Omega base theme and with Node Blocks module enabled.
- drupal_get_breacrumb() returns "Home > [Page Title]" at the preprocess_page level
I'll look into the source and see if I can find out where the problem lies, but I suspect the problem is not limited to Omega subthemes but subthemes of other base themes as well. Your help is appreciated.
Comment | File | Size | Author |
---|---|---|---|
#3 | nodeblock-module-breadcrumb-fix.patch | 659 bytes | goofrider |
Comments
Comment #1
goofrider CreditAttribution: goofrider commentedComment #2
goofrider CreditAttribution: goofrider commentedAfter much digging, I narrowed it down to one place: the node_view() call in nodeblocks.module line 146.
According to Drupal API (http://api.drupal.org/api/drupal/modules--node--node.module/function/nod... ):
Because the 3rd argument of node_view() is set to true, the nodeblock is rendered as a page and hence changed breadcrumb.
Changing line 146 as follows fixes the problem:
It's also still a mystery why it only happens when a subtheme is used.
Comment #3
goofrider CreditAttribution: goofrider commentedHere's a patch
Comment #4
goofrider CreditAttribution: goofrider commentedComment #5
squarecandy CreditAttribution: squarecandy commentedWorks great for me.
For some reason Breadcrumbs were working for normal page-style nodeblocks, but not when I turned ubercart product nodetypes into nodeblocks... this patch solved it.
Thanks!
- P
Comment #6
chrisfromredfinThis patch works for me. I think it would never be the case that you would be displaying a "nodeblock" as a full page, because then, wouldn't you just be viewing the node? So I think this is the right fix, marking RTBC.
Comment #7
NickMrg CreditAttribution: NickMrg commentedI'm new in drupal and i have a problem with omega's breadcrumb. It shows only the "Home" in every page. Can you tell me how can i use this patch? Where should i paste this code?
Thanks in advance!
Comment #8
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedCommitted the fix here:
http://drupalcode.org/project/nodeblock.git/commit/8d4d27d
please tell me if it introduces problems.
Comment #9.0
(not verified) CreditAttribution: commentedAdding Custom Breadcrumbs info