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:546Disabling 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
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | ckeditor5_premium_features--2025-06-28--3531493--mr-30.patch | 31.46 KB | rajab natshah |
| #9 | 3531493_9.patch | 31.03 KB | salmonek |
| #3 | 3531493.patch | 30.32 KB | salmonek |
Issue fork ckeditor5_premium_features-3531493
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:
Issue fork ckeditor5_plugin_pack-3531493
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:
Comments
Comment #2
dadderley commentedSame 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.
Comment #3
salmonek commentedHi,
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_featuresComment #4
aitala commentedTried patch, got same error.
E
Comment #5
chikeThe patch solved the issue for me.
Thanks.
Comment #6
carolpettirossi commented@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?
Comment #7
chikeJust add this within composer.json
patchessection and it should work,Comment #8
chikeckeditor5_premium_featuresis a dependency module that is installed along withckeditor5_plugin_packso 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'scomposer.jsonand it will patch theckeditor5_premium_featuresmodule.Comment #9
salmonek commented@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.
Comment #10
aitala commentedOk, re-rolled patch seems to work.
Thanks,
Eric
Comment #11
dadderley commentedI applied the patch (3531493_9.patch). The WProofreader functionality has been restored.
Thankyou
Comment #12
rajab natshahFacing the issue in Drupal 11.2.2 and Drupal 10.5.1
Comment #13
rajab natshahMoving to CKEditor 5 Premium Features
Comment #15
rajab natshahAttached a static
ckeditor5_premium_features--2025-06-28--3531493--mr-30.patchfile, for current point of MR30.To be used with Composer Patches.
Comment #16
rajab natshahComment #17
chrisla commentedin 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)Comment #18
rajab natshahMe 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...
Comment #19
salmonek commentedPushed:
hook_library_info_alterimplementation to change to old build file reference in case it is neededNot 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.
Comment #21
salmonek commentedCode 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