Tengo un problema con una página de puntos de Sharepoint, que estaba configurada en 2010. El error vino solo, no hubo ningún cambio en su código fuente. El servidor de Windows y el Sharepoint no se han actualizado. El error comienza con un archivo SP.UI.RTE.JS. Cuando estaba buscando el nombre del archivo, encontré muchos foros. De estos aprendí que este es un error típico, que ha sido durante años, pero ninguna de las soluciones propuestas funcionó para mí. Puede ver el error a continuación (en la pantalla de impresión):
ingrese la descripción de la imagen aquí
Probé estas correcciones:
SP.SOD.executeFunc('sp.ui.rte.js', null, function () { if (/var \$v_0 = RTE\.Selection\.getSelectionRange\(\);[\r\n\t ]*var \$v_1 = \$v_0\.parentElement\(\);/.test(RTE.Canvas.checkCurrentFocus.toString())) { var _oldCheckCurrentFocus = RTE.Canvas.checkCurrentFocus; RTE.Canvas.checkCurrentFocus = function () { if(RTE.Selection.getSelectionRange()) return _oldCheckCurrentFocus(); }; } }); function fixRTEBug() { if (typeof RTE.Canvas.checkCurrentFocus !== 'undefined') { RTE.Canvas.checkCurrentFocus = function() {ULSkay:; var $v_0 = RTE.Selection.getSelectionRange(); if ($v_0) { //this is different from SP to avoid error in console var $v_1 = $v_0.parentElement(); if (RTE.Canvas.isInEditable($v_1) && !RTE.Cursor.get_range().isValid()) { RTE.Cursor.updateRangeToCurrentSelection(); RTE.Cursor.update(); } } } } // This Fix for parentElement bug in RTE should survive Service Packs and CU's function SubstituteRTERangeParentElement() { var originalRTERangeParentElement = RTE.Range.prototype.parentElement; RTE.Range.prototype.parentElement = function () { try { originalRTERangeParentElement(); } catch (e) { } } } SubstituteRTERangeParentElement(); } ExecuteOrDelayUntilScriptLoaded(fixRTEBug, "sp.ui.rte.js"); function spUIRTESetStartEndBugFix() { Range.prototype.setStartOld = Range.prototype.setStart; Range.prototype.setStart = (function (a, b) { this.setStartOld(a, Math.min(b, this.endOffset)); }); Range.prototype.setEndOld = Range.prototype.setEnd; Range.prototype.setEnd = (function (a, b) { this.setEndOld(a, Math.min(b, this.endOffset)); }); }; ExecuteOrDelayUntilScriptLoaded(spUIRTESetStartEndBugFix, "sp.ui.rte.js");