Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
book.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 Apr 2013 at 18:12 UTC
Updated:
16 Feb 2015 at 12:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
duellj commentedSplit off from #1898050: book.module - Convert PHPTemplate templates to Twig
Comment #3
duellj commentedForgot to move tests over from #1898050: book.module - Convert PHPTemplate templates to Twig. Tests should pass now
Comment #4
catch#3: 1968982-3-book-table.patch queued for re-testing.
Comment #5
catchWill need a re-roll after #1938296: Convert book_admin_overview and book_render to a new-style Controller.
Comment #6
duellj commentedNot sure this needs a re-roll, since #1938296: Convert book_admin_overview and book_render to a new-style Controller didn't touch book_admin_edit(). Are you talking about rolling that form into BookController?
Comment #7
duellj commented#3: 1968982-3-book-table.patch queued for re-testing.
Comment #8
jibran#3: 1968982-3-book-table.patch queued for re-testing.
Comment #9
jibran#3: 1968982-3-book-table.patch queued for re-testing.
Comment #11
Brandonian commentedPatch rerolled.
Comment #12
jibran#11: 1968982-11-book-table.patch queued for re-testing.
Comment #14
hydra commentedRerolled the patch and fixed some bugs.
Comment #15
lokapujyaLooks pretty good. Maybe we should set the table ID? Previously, it was 'book-outline'.
Comment #16
lokapujyaComment #17
longwaveRerolled.
Comment #18
joelpittetThanks for the re-roll @longwave and it's green nice! There a couple of things and after those I'll give a manual test:
I think that is supposed to still be $node->label()
Not sure why this is needed?
All the t() can be $this->t to use the injected translations.
Comment #19
longwaveFixed all points raised in #18.
Comment #20
lokapujyaAny thoughts on whether we still want the table ID?
Comment #21
longwaveIf the table ID is not referenced anywhere in CSS or JavaScript, I don't see why we need it.
Comment #22
longwaveI think the ID was previously needed only for tabledrag, but not sure we need that any more, since #732022: drupal_add_tabledrag() still using drupal_add_(js|library)(), should return array for #attached was committed.
Comment #23
lokapujyaConflicting with #2084421: Phase 2 - Decouple book module schema from menu links
I'll attempt a reroll.
Comment #24
lokapujyaComment #25
lokapujya['operations'] conflicted, because the other patch had removed the ['href']. I am not sure if adding this back in breaks what they were trying to do in the other patch.
Comment #27
lokapujyaChange to a render array.
Change to route_name?
Comment #28
miraj9093 commentedrerolled ..
Comment #30
jon pughOn it.
Comment #31
temoor commentedPatch rerolled.
Comment #33
temoor commentedUpdated tests, corrected errors from previous patch.
Comment #34
m1r1k commentedComment #35
joelpittetNo longer applies, sorry I didn't get to review earlier, will after re-roll.
Comment #36
star-szrRerolled, some route names changed in the theme function in #2278567: Standardize node route names by relationship. Somewhat of an interdiff attached.
Comment #37
joelpittetI've got a feeling the book module is broken... create one book, no sub pages and save this edit form page:
http://d8.dev/admin/structure/book/1
And it borks up good before and after the patch (slightly different error though, regarding array flipping or missing table index... recoverable fatal). Will need to write a webtest or something, though I think that may need to go into a different issue if one doesn't exist.
Comment #38
lauriiiYeah, tried to test this patch but the book module is broken so the book page cannot be viewed.
Comment #40
cilefen commentedComment #41
cilefen commentedComment #42
cilefen commentedComment #43
kgoel commentedComment #44
kgoel commentedComment #46
lauriiiI was working on this reroll also so we did a bit double work.. But here's the differences from my patch
Comment #47
a-fro commentedDuring manual testing, the operations links were missing, though the text was there. I'm not sure if the other difference is relevant, but I've included a screenshot. @joelpittet, do you happen to know if the [parent] key matters? ie: name="table[book-admin-2][parent][pid]", vs. name="table[book-admin-2][pid]"
Comment #48
a-fro commentedAttaching the before and after txt files from patch 46.
Comment #49
a-fro commentedComment #50
a-fro commentedComment #51
a-fro commentedAfter looking at the code, I had these questions:
The $href here is funky.
These links no longer work. They are missing the a tags and hrefs when rendered to the page.
Comment #52
lauriiiThanks for your review @a-fro! Fixed the links :)
Comment #53
a-fro commentedManual test results below. Looks good to me! RTBC, @joelpittet?
Comment #55
idebr commentedDid a manual test as well, looks clean.
Screenshot after:
Comment #56
alexpott#51 shows that we are missing test coverage here.
Comment #57
lauriiiComment #58
lauriiiAdded test coverage for the View link. It is currently not possible very easily to test Edit link because it requires 'administer nodes' permission which breaks some other stuff because of changed Save button on nodes. I think this should be fixed on a follow-up.
Comment #59
lauriiiComment #60
lauriiiInterdiff for my patch :)
Comment #61
lauriiiLittle clean up for docs & stuff
Comment #62
idebr commentedThe 'limited' key is now hardcoded to 7. This should still use the BookManager::BOOK_MAX_DEPTH constant.
Comment #63
lauriiifixed #62
Comment #64
idebr commentedThe feedback by alexpott in #56 was addressed, setting this back to RTBC and added a beta evalutation.
Comment #65
pwolanin commentedlauriii asked me about the requirement for 'administer nodes' to use the operations. I suspect that was just done for speed and simplicity rather than checking each nodes. I don't think it should be changed in this patch, but could be examined in a follow-up.
Comment #66
joelpittetI didn't see this discussed earlier but wanted to point it out as it looks like it's not needed:
Is this change needed, it looks suspicious because we aren't using the row's values anywhere else.
Other than that, I'd leave it as RTBC, though if you want to throw in some short array syntax for good measure that'd be cool too;)
Comment #67
robmc commentedComment #68
lauriii@robmc: did you find find any other solution to fix that? I checked but the 'nid' item doesn't exist in $values array anymore.
Comment #69
joelpittet@lauriii robmc was working it, he may have a patch to get most of the way there. Essentially the 'nid' was moved onto the 'parent' in the values, and it shouldn't get moved there, which may constitute an API change. So we just need to move that back.
Comment #70
joelpittet@lauriii here's an attempt, I left the ['parent'] key in the form because those form elements need to be in a column and that one makes sense, just removed the parent key from the #parents within FAPI which preserves the $form_state values and leaves the tests and submit handler mostly alone.
Also did all the array short syntax changes that didn't affect the patch size.
Local tests aren't working well for me on the command line or the UI, but manual testing was fine and the values were the way they should be on the submit handler, so here's hoping testbot agrees;)
Comment #71
lokapujyaComment #72
lokapujyaWhile manual testing, noticed that the weights for new pages are negative numbers, whereas in Drupal 7 they are 0. Noticed that when "show weights" is selected, we show the parent column (with nothing in it) but that's the same as Drupal 7. Both are unrelated to this issue, I think.
RTBC+1.
Comment #73
lauriiiAfter manually testing this I don't see any regressions. Also code looks good. I also like the fancy array syntax used in the patch ;)
Comment #74
lokapujyaarray() is sooooo php5.4.
Comment #75
joelpittet5.3 but yeah... agreed:P
Comment #76
alexpottCommitted 0f2348c and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.