djangocms-text-ckeditor icon indicating copy to clipboard operation
djangocms-text-ckeditor copied to clipboard

Crashing Ckeditor with Latest Release 5.0.1

Open vinitkumar opened this issue 2 years ago • 0 comments

We get this crash on production for our websites.

Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
    at b (bundle-fb7663a06e.cms.ckeditor.min.js:775:406)
    at Object.init (bundle-fb7663a06e.cms.ckeditor.min.js:777:16)
    at Object.<anonymous> (bundle-fb7663a06e.cms.ckeditor.min.js:286:426)
    at w (bundle-fb7663a06e.cms.ckeditor.min.js:265:193)
    at Array.x (bundle-fb7663a06e.cms.ckeditor.min.js:265:336)
    at z (bundle-fb7663a06e.cms.ckeditor.min.js:265:420)
    at bundle-fb7663a06e.cms.ckeditor.min.js:266:360

Here is our ckeditor settings

CKEDITOR_SETTINGS = {
    "language": "{{ language }}",
    "toolbar": "CMS",
    "toolbar_CMS": [
        ["Undo", "Redo"],
        ["cmsplugins", "cmswidget", "-", "ShowBlocks"],
        ["Format", "Styles"],
        ["Link", "Unlink", "Anchor"],
        ["Maximize", ""],
        "/",
        [
            "Bold",
            "Italic",
            "Underline",
            "-",
            "Subscript",
            "Superscript",
            "-",
            "RemoveFormat",
        ],
        ["JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock"],
        ["HorizontalRule"],
        ["NumberedList", "BulletedList", "-", "Outdent", "Indent", "-", "Table"],
        ["Source"],
     ]
}       

I think it might have to do with the language settings and some people have not got this error if they don't have this setting.

vinitkumar avatar Mar 30 '22 09:03 vinitkumar