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.
Comment | File | Size | Author |
---|---|---|---|
#11 | 2851504-11-illegal_choice-fail.patch | 1.16 KB | Vj |
#11 | 2851504-11-illegal_choice-pass.patch | 1.84 KB | Vj |
#20 | 2851504-20.test-only.patch | 1.49 KB | alexpott |
#20 | 2851504-20.patch | 2.18 KB | alexpott |
#22 | 11-20-interdiff.txt | 1.49 KB | alexpott |
Comments
Comment #2
cilefen CreditAttribution: cilefen commentedI feel like this may be a duplicate but I don't have time to search at the moment.
Comment #3
margyly CreditAttribution: margyly commentedI don't see a duplicate. This is still a bug. If the page is already in a book you don't get an error. But if it's not in a book, you can't use "Create a new book" to make one.
Comment #4
cilefen CreditAttribution: cilefen commentedThe bug is centered in \Drupal\book\BookManager::addFormElements. When Ajax reevaluates the form element, the "0" value is not added to the options.
(edited - fixed typos)
Comment #5
vomiand CreditAttribution: vomiand at FFW commentedThis is happening becuase $form['book']['bid']['options'] changes depending on the choice.
Comment #6
vomiand CreditAttribution: vomiand at FFW commentedComment #7
cilefen CreditAttribution: cilefen commentedThank you @vomiand!
The identical operator could be used here:
We should be able to add a front-end test for this.
Comment #8
vomiand CreditAttribution: vomiand at FFW commentedUpdated comparison operator.
Comment #9
vomiand CreditAttribution: vomiand at FFW commentedComment #10
Vj CreditAttribution: Vj as a volunteer commented@vomiand #8patch works without issue and warning removed.
Lets add some tests for this.
Comment #11
Vj CreditAttribution: Vj as a volunteer commentedComment #13
pawandubey CreditAttribution: pawandubey as a volunteer and at TATA Consultancy Services commentedPatch#8 working fine and also the test cases are good and succeed.
Let's wait for others to review and we can move this to RTBC.
Comment #15
rpayanmI applied the patch and worked as expected, I think we can move this to RTBC.
Comment #18
xjmFixing the file list so that the latest patch is shown, and updating issue credits. Thanks for working on this issue!
Comment #19
alexpottRather than waiting for time to pass here we should be asserting something.
After selecting 'new' we should wait for the text
This will be the top-level page in this book.
and then test thatNo book selected.
is not there.And after selecting '0' we should wait for the text
No book selected.
and test thatThis will be the top-level page in this book.
is no longer there.Comment #20
alexpottGiven this is over a year old I made the changes recommended by #19 myself.
Comment #22
alexpottForgot to upload an interdiff.
Comment #23
BalajiDS CreditAttribution: BalajiDS at UniMity Solutions Pvt Limited for Drupal India Association commentedPatch #20 is working fine in Drupal - 8.8.6, thanks @alexpott.
Comment #25
mindbet CreditAttribution: mindbet as a volunteer commentedPatch applied successfully to 9.2.0-dev
Tests passing. RTBC
Comment #29
catchCommitted/pushed to 9.2.x and cherry-picked back through to 8.9.x, thanks!