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.
After updating core to 8.4.1 which includes an update of ckeditor to version 4.7.3, the ckeditor stopped loading if ckwordcount is enabled.
Console gives me the following:
Error: [CKEDITOR.resourceManager.load] Resource name "htmlwriter" was not found at "http://www.example.com/core/assets/vendor/ckeditor/plugins/htmlwriter/plugin.js?t=oyshna".
(anonyme Funktion) (ckeditor.js:254:188)
f (ckeditor.js:249:194)
D (ckeditor.js:249:334)
w (ckeditor.js:249:417)
onerror (ckeditor.js:250:365)
Comments
Comment #2
kevinquillen CreditAttribution: kevinquillen at Velir commentedThis was removed from core, is that what you are saying? I had never heard of htmlwriter.
https://ckeditor.com/cke4/addon/htmlwriter
Comment #3
ABaier CreditAttribution: ABaier commentedIt seems that it has never been there, but we have a dependency to it in "libraries/wordcount/plugin.js" on line 9.
Comment #4
ABaier CreditAttribution: ABaier commentedjust updated the library to 1.17, but with the same problem.
Comment #5
kevinquillen CreditAttribution: kevinquillen at Velir commentedDrupal 8.4.x core is still coming bundled with htmlwriter. Taken from ckeditor.js:
CKEDITOR.plugins.add("htmlwriter",{init:function(a){var e=new CKEDITOR.htmlWriter
It also looks like it is part of core CKEditor: https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_output_format
That is to say, this module does not provide it, the plugin assumes it exists (it should).
I have not had time to debug yet. 1.16 should definitely work - I have not tried 1.17. Are there any change logs for 8.4.1 to indicate a change here?
Comment #6
kevinquillen CreditAttribution: kevinquillen at Velir commentedNote that for 8.4.2, CKEditor was downgraded back:
See: #2908864: Update CKEditor library to 4.7.3
Can you upgrade to 8.4.2 and see if the issue persists?
Comment #7
ABaier CreditAttribution: ABaier commentedThanks for the info, Kevin. I will be able to test this after the weekend.
Comment #8
ABaier CreditAttribution: ABaier commentedI can confirm that core 8.4.2 works with ckwordcount and the wordcount library version 1.17.
Thanks for the quick fix!
Comment #9
kevinquillen CreditAttribution: kevinquillen at Velir commentedComment #10
kevinquillen CreditAttribution: kevinquillen at Velir commented