0

I have a legacy internal system that uses TinyMCE but it has stopped working recently and I can't figure out why so I was hoping there might be some users who can help.

The system is an faq type and has 4 tinymce initalised textareas on the one page that when submitted, update the database.

The bugs in Chrome are as follows:

Uncaught Error: INDEX_SIZE_ERR: DOM Exception 1 line 110 in editor_plugin.js of the noneditable plugin which is

r = s.getRangeAt(0);

The other error is

Uncaught TypeError: Cannot read property 'nodeName' of null which is on line 1 of editor_plugin.js of the table plugin. Link: http://www.tinymce.com/wiki.php/Plugin:table

The strange thing is, if I click into the fourth tinymce box on the page and then update the content and submit, the database is updated fine so it's very, very strange.

I know it's very little to go on but the question is more in hope rather than expectation.

The last commit of the editor_plugin_src.js of the noneditable plugin is

editor_plugin_src.js,v 1.1 2010/12/15 14:00:33 amcpeake

I tried looking through the commits for this file on github but couldn't see anything that addressed this bug.

I tried downloading the newest version of tinymce aswell but that completely broke the system.

enter image description here

This is the full branch of code where the noneditable plugin is getting the error from the line mentioned above:

_moveSelection : function(e, inst) {
var s, r, sc, ec, el, c = tinyMCE.getParam('noneditable_editable_class', 'mceNonEditable');

    if (!inst)
        return true;

    // Always select whole element
    if (tinyMCE.isGecko) {
        s = inst.selection.getSel();
        r = s.getRangeAt(0);
        sc = tinyMCE.getParentNode(r.startContainer, function (n) {return tinyMCE.hasCSSClass(n, c);});
        ec = tinyMCE.getParentNode(r.endContainer, function (n) {return tinyMCE.hasCSSClass(n, c);});

        sc && r.setStartBefore(sc);
        ec && r.setEndAfter(ec);

        if (sc || ec) {
            if (e.type == 'keypress' && e.keyCode == 39) {
                el = sc || ec;

                // Try!!
            }

            s.removeAllRanges();
            s.addRange(r);

            return tinyMCE.cancelEvent(e);
        }
    }

    return true;
},
4

0 に答える 0