Update from 4.11.4 to 4.13.

CKEditor 4.12.1 fixed an issue affecting a number of users: https://github.com/ckeditor/ckeditor-dev/issues/2813editor.insertHtml pollutes editable with empty spans

CKEditor 4.13 is a big release: https://ckeditor.com/blog/CKEditor-4.13-with-Paste-from-Google-Docs-rele... — it affects Drupal at least in the following ways:

See also:

#1858210: [meta] Content editing experience follow-ups — in-place editing and WYSIWYG
#1950098: Update CKEditor library to 4.1
#2036253: Update CKEditor library to 4.2
#2039163: Update CKEditor library to 4.4
#2271051: Update CKEditor library to 4.4.4
#2345961: Update CKEditor library to 4.4.5
#2384581: Security: Update CKEditor library to 4.4.6
#2415111: Update CKEditor library to 4.4.7
#2521820: Update CKEditor library to 4.5.3
#2321583: Update CKEditor library to 4.5.5
#2663566: Update CKEditor library to 4.5.7
#2698587: Update CKEditor library to 4.5.8
#2724225: Update CKEditor library to 4.5.9
#2765751: Update CKEditor library to 4.5.10
#2797427: Update CKEditor library to 4.5.11
#2828494: Update CKEditor library to 4.6
#2848215: Update CKEditor library to 4.6.2
#2893566: Update CKEditor library to 4.7.1
#2904142: Update CKEditor library to 4.7.2
#2908864: Update CKEditor library to 4.7.3
#2926932: Update CKEditor library to 4.8.0
#2962330: Update CKEditor library to 4.9.2
#2983516: Update CKEditor library to 4.10.0
#2999691: Update CKEditor library to 4.10.1
#3035933: Update CKEditor to 4.11.3
#3050757: Update CKEditor to 4.11.4

Release notes snippet

CKEditor has been updated from from 4.11.4 to 4.13.0, which includes numerous bugfixes and improvements.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

osopolar created an issue. See original summary.

osopolar’s picture

Issue summary: View changes
Wim Leers’s picture

That will be Drupal 8.8 at the earliest, since it's a new minor version of CKEditor. Sorry about that!

Wim Leers’s picture

Title: Update CKEditor library to version 4.12.1 » Update CKEditor to version 4.12.1
Priority: Normal » Major
Issue tags: +minor version target

Thanks for creating this issue by the way! Tagging to make sure this happens before Drupal 8.8.0-alpha1 :)

Wim Leers’s picture

Title: Update CKEditor to version 4.12.1 » Update CKEditor to version 4.13
Issue summary: View changes
Issue tags: +blocker, +JavaScript, +8.8.0 release notes
Wim Leers’s picture

Status: Active » Needs review
FileSize
3.15 MB
Wim Leers’s picture

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Status: Needs review » Needs work

Working with the CKEditor team because it seems CKEditor 4.13 contains a bug. Transcript from my message sent to them:

@kkrzton If you build CKEditor 4.13.0 with https://github.com/drupal/drupal/blob/8.8.x/core/assets/vendor/ckeditor/..., you’ll get

Uncaught Error: [CKEDITOR.resourceManager.load] Resource name "pastetools" was not found at "http://d8.test/core/assets/vendor/ckeditor/plugins/pastetools/plugin.js?t=pyng0a".
    at CKEDITOR.resourceManager.<anonymous> (ckeditor.js?v=4.13:257)
    at c (ckeditor.js?v=4.13:252)
    at Array.n (ckeditor.js?v=4.13:253)
    at u (ckeditor.js?v=4.13:253)
    at HTMLScriptElement.CKEDITOR.env.ie.d.$.onerror (ckeditor.

Looks like pastetools is a new implicit dependency that does not get included in the build automatically — which indicates a missing dependency declaration

Stay tuned.

Wim Leers’s picture

Status: Needs work » Needs review
FileSize
1.43 MB
3.15 MB
kkrzton  36 minutes ago
It’s caused by the refactoring and the fact the earlier pastefromword plugin had dependency on clipboard plugin only. Now, after the refactor part of it was extracted to pastetools. So pastefromword requires clipboard and pastetools now, that’s why it breaks.

kkrzton  36 minutes ago
TBH I don’t recall similar situations in the past :thinking_face:

kkrzton  35 minutes ago
So rather an edge case, hopefully it didn’t break too many integrations :sweat: :crossed_fingers:

kkrzton  35 minutes ago
That’s interesting case TBH :thinking_face:

kkrzton  34 minutes ago
I’m kind of astounded :smile:

kkrzton  33 minutes ago
Anyway, adding pastetools plugin to config would do the job.

kkrzton  33 minutes ago
And ofc you can also include pastefromgdocs, highly recommended! :smile:

Updating Drupal's build-config.js to include pastefromgdocs.

Wim Leers’s picture

I can confirm that the problem reported in #2948171: [upstream] CKEditor paste from Google Docs resulting in all-bold text is gone as of #9 🥳

Wim Leers’s picture

The bug in CKEditor's build process reported in #8 no longer affects us but was confirmed by the CKEditor team: https://github.com/ckeditor/ckeditor4/issues/3521

BramDriesen’s picture

Status: Needs review » Reviewed & tested by the community

Woot! Great job!

Wim Leers’s picture

Issue tags: +8.8.0 highlights

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

xjm’s picture

Issue summary: View changes
Issue tags: -JavaScript +JavaScript

Expanding the RN slightly.

Pasqualle’s picture

Will this be in D8.8? Can we switch back the issue version field?

  • lauriii committed 602281d on 9.0.x
    Issue #3072382 by Wim Leers: Update CKEditor to version 4.13
    

  • lauriii committed 2e3fcb5 on 8.9.x
    Issue #3072382 by Wim Leers: Update CKEditor to version 4.13
    
    (cherry...

  • lauriii committed 609ee0c on 8.8.x
    Issue #3072382 by Wim Leers: Update CKEditor to version 4.13
    
    (cherry...
lauriii’s picture

Version: 8.9.x-dev » 8.8.x-dev
Status: Reviewed & tested by the community » Fixed

I confirmed that CKEditor was updated correctly by rebuilding the package and comparing the results with git diff --color-words=.. Only changes between the results were hashes that are designed to be unique on every build.

I checked the CKEditor 4 issue queue for any major regressions and it seems like there's a regression on Excel copy-pasting. I discussed this with @catch and we agreed to commit this to 8.8.0 regardless of the regression to avoid having to do a big CKEditor update in 8.9.0. CKEditor has scheduled a release for the beginning of December so we could update to the CKEditor patch release on 8.8.1.

Committed to 9.0.x, 8.9.x and 8.8.x! Thank you!

  • lauriii committed 69a004d on 8.8.x
    Revert "Issue #3072382 by Wim Leers: Update CKEditor to version 4.13"...

  • lauriii committed a6704cf on 8.9.x
    Revert "Issue #3072382 by Wim Leers: Update CKEditor to version 4.13"...

  • lauriii committed 6b97c25 on 9.0.x
    Revert "Issue #3072382 by Wim Leers: Update CKEditor to version 4.13"...
lauriii’s picture

Issue summary: View changes
Status: Fixed » Needs work
FileSize
80.75 KB

I noticed that we might have missed some files in the commit:

Wim Leers’s picture

Assigned: Wim Leers » Unassigned
Status: Needs work » Reviewed & tested by the community
FileSize
393.73 KB
3.18 MB

Excellent catch @lauriii! And interesting that this did not break anything.

Turns out that git add core/ does not do what I think it does on my system. And I found the root cause:

$ git add core/assets/vendor/ckeditor/plugins/*
The following paths are ignored by one of your .gitignore files:
core/assets/vendor/ckeditor/plugins/a11yhelp
core/assets/vendor/ckeditor/plugins/about
core/assets/vendor/ckeditor/plugins/clipboard
core/assets/vendor/ckeditor/plugins/dialog
core/assets/vendor/ckeditor/plugins/image2
core/assets/vendor/ckeditor/plugins/magicline
core/assets/vendor/ckeditor/plugins/pastefromgdocs
core/assets/vendor/ckeditor/plugins/pastefromword
core/assets/vendor/ckeditor/plugins/pastetools
core/assets/vendor/ckeditor/plugins/showblocks
core/assets/vendor/ckeditor/plugins/sourcedialog
core/assets/vendor/ckeditor/plugins/specialchar
core/assets/vendor/ckeditor/plugins/table
core/assets/vendor/ckeditor/plugins/tabletools
core/assets/vendor/ckeditor/plugins/widget
Use -f if you really want to add them.

… turns out that some core patch added (a very broken) .gitignore to the root of my Drupal, and then it was left there 🙃

This is why I was able to do exactly the same as I've done in the more than a dozen past cases where I updated CKEditor, but this time it resulted in a subtly broken patch 🤦‍♂️

  • lauriii committed 6c25c74 on 9.0.x
    Issue #3072382 by Wim Leers, lauriii: Update CKEditor to version 4.13
    

  • lauriii committed 0a0ee6d on 8.9.x
    Issue #3072382 by Wim Leers, lauriii: Update CKEditor to version 4.13
    
    (...

  • lauriii committed 271aa5c on 8.8.x
    Issue #3072382 by Wim Leers, lauriii: Update CKEditor to version 4.13
    
    (...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Thank you! Committed and pushed again. 🤞

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.