Problem/Motivation
MR.
Backport is complete - all tests are fully green on:
- Drupal 10.5.x
- Drupal 11.1.x
- Drupal 11.2.x
- Drupal 11.3.x
Untested on
- Drupal 10.4.x (untested)
BACKGROUND INFORMATION:
We need to support Drupal 10.4.x, Drupal 10.5.x and Drupal 11.1.x and are unable to upgrade to Drupal 11.2.5 at this time due to various reasons.
We need the said functionality provided by 3.0.x that was added in:
#3173808: Make book child content-type configurable per enabled book content-type
We had the desired functionality working with Drupal 10 using a core patch.
When we upgraded to Drupal 11, we dropped the core patch obviously, since it no longer applied, forgot about it, and then 8 months after upgrading we noticed a bunch of broken functionality that previously was not broken.
The fix/features were applied to 3.0.x however 3.0.x was made incompatible with Drupal 11.1.8.
So, I've made it compatible with Drupal 11.1.8, Drupal 10.5.x without breaking Drupal 11.2.x and Drupal 11.3.x.
Proposed resolution
See MR
Remaining tasks
Review MR and test it.
User interface changes
See
#3173808: Make book child content-type configurable per enabled book content-type
and including all fixes/enhancements that are currently in 3.0.x
| Comment | File | Size | Author |
|---|---|---|---|
| #52 | 3554905-book-3x-to-2.0.3.patch | 269.74 KB | joseph.olstad |
| #50 | 3554905-from-3x-re_apply_solution.patch | 2.35 KB | joseph.olstad |
| #50 | 3554905-2x-conflict-revert.patch | 2.39 KB | joseph.olstad |
| #47 | book-3554905-backport-3x.patch | 275.71 KB | joseph.olstad |
| #44 | book-3554905-backport-3x.patch | 276.06 KB | joseph.olstad |
Issue fork book-3554905
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3554905-clean-full-backport
changes, plain diff MR !152 /
changes, plain diff MR !136
- 3554905-full-backport
changes, plain diff MR !135
- 3554905-cleaner-backport
changes, plain diff MR !133
- 3554905-merge-3.0.x-into-2.0.x-with-fixes
changes, plain diff MR !131
- 3554905-2.0.x-backport-of
changes, plain diff MR !127
- 3554905-make-3x-compatible-with-D11x1
changes, plain diff MR !128
Comments
Comment #3
joseph.olstadOk I brought everything from book 3.0.x over to book 2.0.x
and then I backed off the changes that make 3.0.x incompatible with Drupal 11.1.8.
I changed all the version pinning from ^11.2 to ^11.1
made another change to book.post_update.php as it crashed my environment, the changes are in the merge request.
"drupal/book": "2.0.x-dev#b966267a as 2.0.2",this patch:
Comment #5
joseph.olstadNeed to make a new MR based off of 3555112 and set it to merge to 2.0.x
#3555112: Make 1.0.x Livre a version of Book 3.0.x that is compatible with Drupal 11.1.8+
Comment #9
smustgrave commentedSorry this feature I purposely did not backport for it's disruptive behavior.
Comment #11
joseph.olstadWe need this desperately before a prod release. Cannot upgrade to D11.2.x so we need this functionality in D11.1.8.
All tests are passing 100% in Drupal 11.2.x while there's now only two fails , possibly insignificant fails for D11.1.8.
Comment #12
joseph.olstadSo, we had the desired functionality working with Drupal 10 using a core patch.
When we upgraded to Drupal 11, we dropped the core patch obviously, since it no longer applied, forgot about it, and then 8 months after upgrading we noticed a bunch of broken functionality that previously was not broken.
The fix/features were applied to 3.0.x however 3.0.x was made incompatible with Drupal 11.1.8.
So, I've made it compatible with Drupal 11.1.8 and only seeing two errors in the tests that likely won't affect us, and to avoid problems with composer I'm creating a merge patch to bring this back to 2.0.x.
Would like to fix the two remaining issues but probably don't need to.
Comment #13
joseph.olstadComment #14
joseph.olstadComment #15
joseph.olstad*** EDIT ***
Noise
*** END EDIT ***
Comment #16
joseph.olstadAlmost perfect now.
"drupal/book": "2.0.x-dev#b966267a as 2.0.2",this patch:
Comment #19
joseph.olstadComment #20
joseph.olstadNext commit will add test coverage for 10.5.x
Comment #22
joseph.olstadComment #26
joseph.olstadComment #27
joseph.olstadComment #28
smustgrave commentedI’ll leave these 2 issues open for a week or so but will eventually close out to keep the queue clear for just valid issues
Thanks!
Comment #29
joseph.olstadComment #30
joseph.olstadComment #31
joseph.olstadComment #32
joseph.olstadBasically not needed now, Livre 1.0.x is compatible with Drupal 10.5.x, Drupal 11.1.x, Drupal 11.2.x and Drupal 11.3.x and is based off of the 3.0.x branch of the Book module.
Keeping an eye on the upstream for changes, will ensure git aligns when possible.
Comment #34
joseph.olstadupdating the merge request.
Comment #35
joseph.olstadComment #36
joseph.olstadAll tests passing, 100% green!
Comment #38
joseph.olstadReviewing this
Comment #43
smustgrave commentedSorry for the noise closing MRs on the book side.
Comment #44
joseph.olstadComment #45
joseph.olstadPatch #44 essentially makes book 2.0.x equivalent to livre 1.0.2 , which it'self is essentially book 3.0.x except backwards compatible with all supported releases of Drupal core.
With that said, probably easier to move forward with livre until we're ready for Drupal 11.2/11.3.
Keeping both options on the table for the moment:
Option #1 ) Patch the book module (276 kilobytes of patching)
Option #2 ) Simply require drupal/livre , no need to patch, replaces book without fuss.
Comment #47
joseph.olstadRolled again for 2.0.3
Comment #48
joseph.olstadOk patch 47 won't roll, fatal merge conflict, I won't be able to maintain book 2.0.x this way, recommending everyone use livre instead which aligns well with book 3.0.x.
Comment #49
joseph.olstadhmm , might have been a composer glitch
Comment #50
joseph.olstadOk for book 2.0.3:
apply this patch which reverts the conflicting bit
Revert conflict
then this patch
backport 3x
then this patch
what was removed from conflict, apply forward fix from 3x instead
Comment #51
smulvih2@joseph is it possible for WxT to stick with drupal/book 1.x (last updated April 2024) and have that work as it did before, and wait for WxT 6.2.x (11.2.x) to upgrade to book 3.x? Essentially skip book 2.x?
Comment #52
joseph.olstadThis patch is for 2.0.3 specifically
Ok comment #50 is for 2.0.x dev only.
I've made a new one, one patch for book 2.0.3 which brings all of the 3.0.x functionality to 2.0.x , this should work.
The conflict with patch 47 and 2.0.3 was related to the stupid build info yml with the release date
New patch now
Comment #53
joseph.olstadUnfortunately we already upgraded to 2.0.x with wxt 5.4.x and 6.1.x so we're committed now.
Also, I've aligned the configuration to the new array format in the bundle settings for book 3.0.x / livre 1.0.x
I recomment livre 1.0.7+
Comment #54
joseph.olstadReviewing this again.
Comment #55
joseph.olstadNot needed, livre 1.0.5 is based on book 3.0.x, has nothing from 2.0.x.