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.
Hi
Ever since upgrading some modules and going to the latest drupal version last month, there has been an issue on my site:
- admin/build/blocks shows the administration theme instead of the site theme.
- "Page Theme" module doesn't do what it's supposed to do anymore.
Took me a long time to figure out what was causing it, and to my own surprise I narrowed it down to this line in custom breadcrumbs:
$variables['breadcrumb'] = theme('breadcrumb', drupal_get_breadcrumb());
inside custom_breadcrumbs_init().
Commenting out this line makes the issues disappear (but also, makes the custom breadcrumb disappear obviously).
Is there an alternative way to do this?
Comments
Comment #1
rv0 CreditAttribution: rv0 commentedto fix this, I now went back to 6.x-2.0-beta3, where I did not have that issue.
Comment #2
MGN CreditAttribution: MGN commentedThis code looks like a mistaken carryover from hook_preprocess_page. I think the correct solution is to remove the line
$variables['breadcrumb'] = theme('breadcrumb', drupal_get_breadcrumb());
from custom_breadcrumbs_init().I've done this and tested the "Use the menu structure to set the breadcrumb trail" option and it works fine without the line.
I am confused by your comment that this made the breadcrumb disappear. It shouldn't have. Can you verify that removing the line in the current code fixes the problem before I commit the change?
Thanks
Comment #3
rv0 CreditAttribution: rv0 commentedcan't test now, site is being launched today
will post back here if i get a chance to test it.
Comment #4
phiscock CreditAttribution: phiscock commentedI discovered the same problem on my site today. However having tested the change you suggested it seems to have fixed the problem and the breadcrumbs are still showing as I expected them to.
Paul
Comment #5
MGN CreditAttribution: MGN commentedI believe this is now fixed with the latest commit to 6.x-2.x-dev.