Problem/Motivation

I'm having an issue with the free WProofreader plugin. It is preventing the CKE5 Editor from loading and giving the following error in the browser console.

TypeError: this._userOptions.hasOwnProperty is not a function. (In 'this._userOptions.hasOwnProperty("autoStartup")', 'this._userOptions.hasOwnProperty' is undefined)
_setAutoStartup — wproofreader.js:575
init — wproofreader.js:546

Disabling both WProofreader plugins fixes the issue.

I have had this happen on two different sites, both running D10.5.0 and PHP 8.3.21

Steps to reproduce

Enable both Plugin pack modules
Enable WProofreader button in CKE config.
Go to a node/add form, note that body field (for that Text Format) has no editor...

This is with version 1.3.2 of the free version and 1.4.2 or the Premium version

Thanks,
Eric

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 3531493- Comparecompare
  • 3531493-1.3.x Comparecompare

Comments

aitala created an issue. See original summary.

dadderley’s picture

Same problem for me with same config.

In the Full HTML text format I disabled the WProofreader button and the CKEditor now loads (it did not before).
This fix worked on 4 separate sites on 2 servers with different PHP versions.

aitala thanks for your info.

salmonek’s picture

Status: Active » Needs review
StatusFileSize
new30.32 KB

Hi,
The error is a result of WProofreader plugin incompatibility with latest CKEditor 5 version (v45).
Attaching a patch with an updated WProofreader version. The patch has to be applied on drupal/ckeditor5_premium_features

aitala’s picture

Tried patch, got same error.

E

chike’s picture

The patch solved the issue for me.

Thanks.

carolpettirossi’s picture

@salmonek I'm getting the same error and I don't have the ckeditor5_premium_features module installed. I believe there should be a different fix/patch?

chike’s picture

Just add this within composer.json patches section and it should work,

"drupal/ckeditor5_premium_features": {
                "WProofreader Plugin Issue": "https://www.drupal.org/files/issues/2025-06-23/3531493.patch"
            }
chike’s picture

ckeditor5_premium_features is a dependency module that is installed along with ckeditor5_plugin_pack so it is already there. You can see it in the lock file if you want to check. So just add the patch to your projects's composer.json and it will patch the ckeditor5_premium_features module.

salmonek’s picture

StatusFileSize
new31.03 KB

@aitala
Please try updated patch (cache rebuild required)

@carolpettirossi
Exactly as @chike said premium_features is a dependency for a plugin_pack. In case of Plugin Pack WProofreader installation also PF WProofreader is being enabled and the script is there, thus the patch is for Premium Features module.

aitala’s picture

Ok, re-rolled patch seems to work.

Thanks,
Eric

dadderley’s picture

I applied the patch (3531493_9.patch). The WProofreader functionality has been restored.
Thankyou

rajab natshah’s picture

Title: WProofreader Plugin Issue » Fix WProofreader JS Error Preventing CKEditor 5 from Loading

Facing the issue in Drupal 11.2.2 and Drupal 10.5.1

rajab natshah’s picture

Project: CKEditor 5 Plugin Pack » CKEditor 5 Premium Features

Moving to CKEditor 5 Premium Features

rajab natshah’s picture

Attached a static ckeditor5_premium_features--2025-06-28--3531493--mr-30.patch file, for current point of MR30.
To be used with Composer Patches.

rajab natshah’s picture

Version: 1.3.2 » 1.4.2
chrisla’s picture

in js/build/wproofreader.js there is a console.log instance returning output whenever the CKEditor loads. Not sure if this is intentional.

console.log(Object.prototype)

rajab natshah’s picture

Me too.. It is in #3 and #9
Noticed the console.log(Object.prototype),Object.prototype.hasOwnProperty.call(this._userOptions,"autoStartup") it was not in the old script.
Not sure if the build was with a dev option, or if it came from the
Also found in
https://github.com/WebSpellChecker/wproofreader/blob/master/wscbundle/ws...

salmonek’s picture

Pushed:

  • build without console.log
  • sources form https://github.com/WebSpellChecker/wproofreader-ckeditor5 (we use that one, not wscbundle)
  • old build for compatibility with CKEditor 5 older than v41.0.0
  • hook_library_info_alter implementation to change to old build file reference in case it is needed

Not sure how this log ended there. It's not in the sources and I do not remember adding it manually (however this seems most probable).

We're planning to release it tomorrow.

salmonek’s picture

Status: Needs review » Fixed

Code was merged and released in version 1.5.0

In case you use some of premium plugins other than WProofreader please note that we changed our third party composer requirements to suggestions. Depending on used features some packages may need to be manually installed after update to version 1.5.0.
More info here

Status: Fixed » Closed (fixed)

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