- Issue created by @duckydan
- Status changed to Postponed: needs info
9 months ago 5:58am 26 April 2024 - π΅π±Poland dolszewski
Hello @duckydan
We will need more information about your issue.
What do you mean by "all the ckeditor instance on the page"? Do you have multiple fields with the editor on the node edit page?
Which version of Drupal do you use?
Can you send some screenshots and errors from the console?
Do you use any other contrib module for ckeditor5? - πΊπΈUnited States duckydan
Hi,
Here is using this module versus the other module.
Two active editor instances on the page:
ckeditor5_word_count
This module
Error:
[Error] TypeError: null is not an object (evaluating 'this.wordCountWrapper.appendChild') init β js_zOFaiI9NhmzRFDJtbTw54krp_rYkGjyLTbct6SSnvLg.js:40 (anonymous function) (js_ls5PfL4dqY75JAnrMyM9p9UF5jrVzr1c07bF4EJVVTA.js:17:5449)
Environment:
Drupal version 10.2.5
PHP version 8.1.12I have these modules installed:
- π΅π±Poland salmonek
Hi @duckydan
Is there any chance that some custom code is adding own'#suffix'
to the textarea? - Status changed to Active
9 months ago 1:30pm 26 April 2024 - πΊπΈUnited States duckydan
I switched it to active after providing this info. I hope that was OK.
- πΊπΈUnited States duckydan
My custom code is really limited. It is for stuff like emails and creating and removing nodes behind the scenes. Nothing that would do something like that.
The additional ckeditor instances show up via Inline Entity Forms. So they are being created via ajax. Could that be something?
- πΊπΈUnited States duckydan
I have a page where there are a bunch of ckeditor fields in paragraphs that all display at once. That works perfectly fine. So if they are all on the page to start with, the error does not occur.
- π΅π±Poland salmonek
Thank you, we have reproduced the issue, and will notify you once we have it solved.
- Merge request !1[3443601] 66 Fix Word Count for ajax-loaded field items β (Merged) created by salmonek
- π΅π±Poland salmonek
@duckydan
I've posted MR with fix.
We'll have internal QA on this issue however this may take some time (this week weekend in Poland starts on Wednesday).
Feel free to test the solution, we'll be happy for any feedback. - Status changed to Needs review
9 months ago 9:49am 29 April 2024 - Status changed to RTBC
9 months ago 3:46pm 30 April 2024 - π¨π¦Canada endless_wander
Thank you for this cool group of plugins. I was encountering a similar issue using just a single instance of CKEditor in combination with the Layout Paragraphs module.
When adding a Paragraph via the Layout Paragraphs interface, CKEditor would not load. Console log gave same error as OP
TypeError: null is not an object (evaluating 'this.wordCountWrapper.appendChild')
Using merge request from #10 solves my issue as well.
- Status changed to Fixed
7 months ago 6:52am 14 June 2024 - π΅π±Poland dolszewski
The latest release (1.1.0) contains a fix for that bug.
Automatically closed - issue fixed for 2 weeks with no activity.