I feel kinda stupid reporting this, since there are already working tests covering this, but it still reliably breaks for me:
- New, clean Drupal installation
- Enable the Book module
- Create two book pages, the second with the first as its parent
- At the second book page, only "Home" appears in the breadcrumb
What's particularly peculiar about this is that right after that I successfully ran the Book tests under that installation, and in the verbose messages the breadcrumbs were correct. (In another install, it's exactly the same.)
Can anyone else reproduce this problem? Or give me a hint what could be wrong?
Comment | File | Size | Author |
---|---|---|---|
#14 | book-missing-breadcrumb-943520-13.patch | 1.34 KB | iSampo |
Comments
Comment #1
HazaConfirmed here.
Also run all the book tests without any fail/exception.
Comment #2
drunken monkeyIt gets weirder:
5) On the second book page click "Edit", then "Save".
6) Breadcrumb is displayed correctly.
Same result when selecting the node in admin/content and then doing a "publish selected content" or some other no-op action. It seem that the breadcrumb somehow is only correctly displayed, after the node was saved a second time.
I first thougt that this would, strange as it is, at least explain the thing with the tests passing – but no, it doesn't seem like the node is edited before checking for the breadcrumb, and the bug also appears with Javascript disabled (to have exactly the same workflow as the test bot).
PS: Great, I can't reproduce the bug any more! o_O Now, only on the first view (right after creating the node) the breadcrumb isn't displayed, but after reloading it's there. I didn't update the code and I also checked after reinstalling, but the bug seems gone.
@ Haza: Are you still seeing this?
Comment #3
ygerasimov CreditAttribution: ygerasimov commentedI have the same here. Right after creating second book node breadcrumb is not displayed. But after reloading the page it is displayed correctly. Looks very strange.
Comment #4
HazaHo yes, you're right drunken monkey, it seem's that only the breadcrumb is missing only the first time you see the page. (it's the same for me as you describe)
Really weird, yes.
Comment #5
cyxair CreditAttribution: cyxair commentedI'm getting the same behavior : breadcrumbs are not complete on page load, but are correct after browser refresh.
Did anyone find some workaround or patch ?
Comment #6
graytoby CreditAttribution: graytoby commentedI'm missing breadcrumbs too, re-saving book page doesn't help. Book only shown link to home page in breadcrumb. I've tried custom breadcrumb module and menu breadcrumb module too, no luck.
Comment #7
Ryan Senese CreditAttribution: Ryan Senese commentedI'm having this problem as well. One (stupid) way I devised to temporarily fix it is by making a script to crawl all the pages once a day. I'd rather not have to do that, though...
Comment #8
birdfoot CreditAttribution: birdfoot commentedConfirm this is the case. I'm currently on Drupal 7.8.
I can be reproduce in this way:
1. Navigate and access one of the nested pages in a book via Book Navigation block
2. Checks that breadcrumbs is showing only "Home"
3. Click on the link (for the currently located page) in Book Navigation block
4. Checks that breadcrumbs is now showing the correct trails
Comment #9
graytoby CreditAttribution: graytoby commentedMy navigation block doesn't show current page so I can't even reproduce that behavior.
Comment #10
dwalker51 CreditAttribution: dwalker51 commentedI also have the same problem, if I click the link for the second time, the proper breadcrumb appears otherwise it just goes and places it under home.
Comment #11
droweski CreditAttribution: droweski commentedI have same behavior on d7.10 as well.
Comment #12
iSampo CreditAttribution: iSampo commentedConfirming this bug on the latest dev version.
Breadcrumbs are appearing when viewing the page for a second time.
Also noticed that the breadcrumbs are re-disappearing when clearing all caches. Gonna try to find out what's causing this.
Comment #13
iSampo CreditAttribution: iSampo commentedSo getting back to this:
Book is executing the function menu_set_active_menu_names() at book_page_alter(), so it can alter the menus on page load (since the Book menu isn't a 'real' menu and not listed as an active menu?).
I moved the book_page_alter() function contents into the book_node_view() function and it seems to be working as it should (as well as calling it at hook_init but that doesn't feel right).
Maybe some Book module guru might be able to tell whether or not this might break a thing or two.
I'm more than happy to roll a patch if some other function is a better home for the function contents. Thanks.
Comment #14
iSampo CreditAttribution: iSampo commentedSo here's a patch how it would look like.
Comment #15
jaxon77 CreditAttribution: jaxon77 commentedI'm having the same issue. The breadcrumb sometimes shows up and sometimes doesnt. It seems it usually only shows up when I hit page refresh.
Comment #16
haydeniv CreditAttribution: haydeniv commentedBugs should be fixed in 8.x then backported to 7.
Comment #17
haydeniv CreditAttribution: haydeniv commentedGrr. Forgot to tag.
Comment #18
Chi CreditAttribution: Chi commentedI could not reproduce the bug on Drupal 8, so move this back to 7.x.
Comment #19
Leagnus CreditAttribution: Leagnus commentedOn D7.43 if i insert page` (that belongs to book menu hierarchy) url into custom menu block and save this menu,
then the page looses its breadcrumbs.
If i re-save the page – breadcrumbs appear as it should be.
The bug also appears till second refresh of the page
when i enable or disable the menu point using menu poweredit.
The effect touches all of the custom menu pages,
that belong to book menu hierarchy.
Clearing cache after modifying the menu solves the issue.