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.
Use Drupal.behaviors.book_title_override.attach instead of $(document).ready.
Comment | File | Size | Author |
---|---|---|---|
#1 | book_title_override-js-behaviors-2478903-1.patch | 1.65 KB | osopolar |
Comments
Comment #1
osopolarComment #2
btopro CreditAttribution: btopro commentedpinging mark to test, makes sense.
Comment #3
mmilutinovic1313 CreditAttribution: mmilutinovic1313 commentedDidn't break anything, but saving with an override doesn't do anything and the box becomes unchecked the next time you go into the Book via edit.
Comment #4
btopro CreditAttribution: btopro commentedthat sure sounds like something broke...
Comment #5
btopro CreditAttribution: btopro commentedalso what theme / jquery stuff are you using? there have been some conflicts reported there in the past unfortunately
Comment #6
mmilutinovic1313 CreditAttribution: mmilutinovic1313 commentedI noticed this issue in both patches - That's why I assume it is not related, but I will investigate further
Comment #7
mmilutinovic1313 CreditAttribution: mmilutinovic1313 commentedAfter further examination, Patch is Verified and working!
Further note: Settings for overrides will only save if the book is in an outline. I don't know if it would be possible, useful, or too confusing to have the override save if the book was not yet in an outline (just as kind of a meta property).
Comment #8
btopro CreditAttribution: btopro commentedit can't save unless its in an outline cause it doesn't have a menu item to associate to. do a PR against the github mirror so we can get this in
Comment #9
mmilutinovic1313 CreditAttribution: mmilutinovic1313 commentedWhich branch for the PR to compare to? And do you want me to apply the patch before I do the PR?
Comment #10
btopro CreditAttribution: btopro commented7.x-1.x
Comment #11
osopolarI am a bit confused about the changes in the last Release 7.x-1.1, where the file book_title_override.js was replaced by book_title_override_ops.js (with a strange namespace
Drupal.outline_designer_ops.book_title_override
), but I guess this issue is obsolete now, isn't it?Comment #12
btopro CreditAttribution: btopro commentedso book_title_override was replaced by the core form API function to show and hide based on a checkbox.
The ops file you are referencing should have always been there and is only utilized as part of the https://www.drupal.org/project/outline_designer integration
Also, yes, this thread is most likely resolved since we're using the core method of solving this now which does use behaviors
Comment #13
btopro CreditAttribution: btopro commentedthis was fixed in 1.1 by implementing the core method of opening