Dear,
When updating to core 8.5.2, webform "wysiwyg" fields break.
It seems that webform refers to "core/core.libraries.yml"
(WebformLibrariesManager.php l: 254 - 255)
protected function initLibraries() {
// Get Drupal core's CKEditor version number.
$core_libraries = Yaml::decode(file_get_contents('core/core.libraries.yml'));
$ckeditor_version = $core_libraries['ckeditor']['version'];
In this file we refer to ckeditor "4.8.0+2018-04-18-security-patch". (l 26 -27
This does not exist anymore and thus it fails loading some plugins and this breaks ckeditor.
ckeditor:
remote: https://github.com/ckeditor/ckeditor-dev
version: "4.8.0+2018-04-18-security-patch"
license:
name: GNU-GPL-2.0-or-later
url: https://github.com/ckeditor/ckeditor-dev/blob/4.8.0/LICENSE.md
gpl-compatible: true
js:
assets/vendor/ckeditor/ckeditor.js: { preprocess: false, minified: true }Changing the version to "4.9.2" fixes the problem.
Can anyone confirm this ?

| Comment | File | Size | Author |
|---|---|---|---|
| #11 | Screen Shot 2018-04-19 at 2.55.53 PM.png | 188.19 KB | jrockowitz |
| #11 | 2962352-11.patch | 3.71 KB | jrockowitz |
| #9 | 2962352-9.patch | 1.43 KB | jrockowitz |
Comments
Comment #2
mschudders commentedAlso useful: https://www.drupal.org/project/drupal/issues/2962330
Comment #3
mschudders commentedComment #4
cilefen commentedComment #5
cilefen commentedWhoops.
Comment #6
cilefen commentedI am moving this to webform as per @jrockowitz.
Comment #7
damienmckennaWould it be enough to just use the x.y.z portion of the string?
Comment #8
jrockowitz commented@DamienMcKenna Yes, it should be a one-line fix. I will look into it. I might decide to pull the version number from the ckeditor URL.
Comment #9
jrockowitz commentedI just need someone to review the patch and mark this RTBC.
Comment #10
webchickI wonder if an approach like this would work a bit better? https://drupal.stackexchange.com/questions/226044/how-to-access-library-... Basically, leveraging core's libraries API vs. Webform implementing its own workaround.
Comment #11
jrockowitz commentedYep, it is much smarter to get the CKEditor version number from the library.discovery service because this would account for the CKEditor library and version number being altered and the Webform module would now be able to recognize the updated version number.
It is little strange how the library.discovery service is including the Drupal Core version and the CKEditor version.
@webchick Thanks for the suggestion. I am so used to parsing YAML I did not think to use an API.
Comment #12
berdirWe confirmed that this fixes the problem for us and yes, using the API looks nicer than directly reading the file. You never know if someone alters that file to switch it with a different version for example.
Possibly wouldn't hurt to have a test for it, but setting to RTBC anyway.
Comment #14
jrockowitz commentedComment #15
jrockowitz commentedI tagged a new release.
https://www.drupal.org/project/webform/releases/8.x-5.0-rc11
Comment #16
wim leers👌