From 7768511fe68720c157413aec960d65a6cf7a2f63 Mon Sep 17 00:00:00 2001 From: Justin Chines Date: Tue, 14 Jan 2025 14:44:52 +0700 Subject: [PATCH 1/2] Add server logging for CKEditor state changes --- src/public/app/widgets/type_widgets/editable_text.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/type_widgets/editable_text.js b/src/public/app/widgets/type_widgets/editable_text.js index 607df2349..16016da5b 100644 --- a/src/public/app/widgets/type_widgets/editable_text.js +++ b/src/public/app/widgets/type_widgets/editable_text.js @@ -170,7 +170,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget { return; } - console.log(`CKEditor changed to ${currentState}`); + logInfo(`CKEditor changed to ${currentState}`) this.watchdog.crashes.forEach((crashInfo) => console.log(crashInfo)); @@ -182,6 +182,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget { }); this.watchdog.setCreator(async (elementOrData, editorConfig) => { + logInfo("Creating new CKEditor") const extraOpts = {}; if (isClassicEditor) { extraOpts.toolbar = { From b173429dc500c0144b50816597100ead25fb17d9 Mon Sep 17 00:00:00 2001 From: Justin Chines Date: Tue, 14 Jan 2025 15:16:51 +0700 Subject: [PATCH 2/2] Add more logging of CKEditor crashes --- src/public/app/widgets/type_widgets/editable_text.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/public/app/widgets/type_widgets/editable_text.js b/src/public/app/widgets/type_widgets/editable_text.js index 16016da5b..b22b8cdb2 100644 --- a/src/public/app/widgets/type_widgets/editable_text.js +++ b/src/public/app/widgets/type_widgets/editable_text.js @@ -165,13 +165,13 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget { this.watchdog.on("stateChange", () => { const currentState = this.watchdog.state; + logInfo(`CKEditor state changed to ${currentState}`); if (!["crashed", "crashedPermanently"].includes(currentState)) { return; } - logInfo(`CKEditor changed to ${currentState}`) - + logInfo(`CKEditor crash logs: ${JSON.stringify(this.watchdog.crashes)}`); this.watchdog.crashes.forEach((crashInfo) => console.log(crashInfo)); if (currentState === "crashedPermanently") { @@ -182,7 +182,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget { }); this.watchdog.setCreator(async (elementOrData, editorConfig) => { - logInfo("Creating new CKEditor") + logInfo("Creating new CKEditor"); const extraOpts = {}; if (isClassicEditor) { extraOpts.toolbar = {