Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
book.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Jan 2014 at 18:44 UTC
Updated:
29 Jul 2014 at 23:19 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
jessebeach commentedComment #2
larowlanDef needs tests
Comment #3
larowlanNo JavaScript here.
Leaving the fix as part of the Novice task.
But here are the tests - patch should fail.
Hint the issue is with lines 555-> 559 as book_link_load() now returns an EntityInterface, not an array.
Comment #5
lucastockmann commentedComment #6
lucastockmann commentedI think there is a problem with the
book_link_loadfunction. It doesn't adds thebidto the menu_link object. :(And it's probably a bad idea to load the node object to get the
bidfrom it.Maybe we should have a closer look on the
book_link_loadfunction. Is there anyone who would like to maintain me here?Comment #7
internetdevels commentedThis should fix the issue.
Comment #8
internetdevels commentedComment #10
jessebeach commented+ $route_parameters = unserialize($entity->route_parameters);I'm guessing that
$entity->route_parametershas already been unserialized at this point.Comment #11
lucastockmann commentedImproved the patch from comment 7 a bit.
Comment #12
javisr commentedI tested the patch on #11 and i got the expected result
Comment #13
lucastockmann commentedFound a mistake in the patch. There is a unnecessary if-rule ..
I removed it and re-uploaded the patch.
Comment #14
javisr commentedReviewed. It is working with the expected result.
Comment #15
mcjim commentedThis is a good approach and got further than we did in #2012920: Add child page link in book navigation does not insert parent into book outline.
One important change:
$entity->route_parameters['node']is only loading the $nid, but we need the $bid. We need the actual $bid to make the links work when adding child pages to child pages, etc.I added a query to bring that in.
There's a test in #2012920: Add child page link in book navigation does not insert parent into book outline that I haven't managed to get working yet.
Comment #18
mcjim commentedThis may not be needed once #2084421: Phase 2 - Decouple book module schema from menu links gets in, as that also fixes this issue.
Comment #19
mcjim commented#2084421-134: Phase 2 - Decouple book module schema from menu links has been committed and fixes this.