I can not get the breadcrumbs to display with my child theme. They appear correctly when using the bootstrap theme. When the child theme is set, the bootstrap_preprocess function in bootstrap.theme is never called with the "breadcrumb" $hook. I have breadcrumbs enabled. Any ideas on what might be causing this?

CommentFileSizeAuthor
#2 sub-theme-breadcrumbs.png108.9 KBmarkhalliwell
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rodney757 created an issue. See original summary.

markhalliwell’s picture

Category: Bug report » Support request
Status: Active » Closed (cannot reproduce)
Issue tags: -breadcrumbs
FileSize
108.9 KB

My guess is that the site breadcrumbs aren't being constructed properly. They work fine with breadcrumbs provided by core.

ewing.rj@gmail.com’s picture

I tried creating a new child theme, as well as reinstalling bootstrap theme and it still doesn't work.

Did it work on non-admin areas for you?

Any ideas what might be causing it?

ewing.rj@gmail.com’s picture

Is there something in the child theme that would prevent

function bootstrap_preprocess(&$variables, $hook, $info)

being called with $hook = "breadcrumb"? In my child theme, $hook is never "breadcrumb", but when using the bootstrap theme, the above function gets called with $hook = "breadcrumb".

What determines the $hook? It seems like some setting is being ignored

Majdi’s picture

@ewing.rj I think you missing renaming yml files under config directory of your child theme, rename with your theme name and update the child theme settings with breadcrumb then it should be visible.

akupaka’s picture

I'm not sure because of a lack of experience, but it seems that until "Show 'Home' breadcrumb link" checkbox is set in theme's settings (Components/Breadcrumbs) function preprocessVariables in Bootstrap/src/Plugin/Preprocess/Breadcrumb.php won't set breadcrumb variable used in Twig templates.

dureaghin’s picture

Same issue, I can not get breadcrumbs to display properly child titles on my sub-theme. For example, this is my menu structure:

Current:
- Home
--Categories (I see this: Home/Categories)
---Category (I see this: Home/Category)
----SubCategory (I see this: Home/SubCategory)

Should be:
- Home
--Categories (I see this: Home/Categories)
---Category (I see this: Home/Categories/Category)
----SubCategory (I see this: Home/Categories/SubCategory)

Tsegaye’s picture

It look me few hours to make them work. I was on D8 (8.6.1), created subtheme from Bootstrap 8.x-3.12. They did’t show up. In the sub theme bootstrap settings in the admin, I had to check and uncheck the components -> breadcrumbs options (Show ‘Home’ breadcrumb link, show current page title at end) and cleared registry. Then, it showed up.

srijeeta’s picture

markhalliwell’s picture