Problem editing any templates

Hi I have a problem editing any templates e.g. Ticket Template. As soon as I select the template and save it (not even making any changes) I get a block of HTML added to the start -

(function() { try { var sp_old_HTMLFormElementPrototype_submit = HTMLFormElement.prototype.submit; HTMLFormElement.prototype.submit = function() { try { var spEvent = document.createEvent(‘Event’); spEvent.initEvent(‘sp_submit’, true, true); this.dispatchEvent(spEvent); } catch(ErrorMessage) { console.error('spFormElementPrototype() Error sending “sp_submit” event from HTMLFormElement.prototype.submit: ’ + ErrorMessage); } sp_old_HTMLFormElementPrototype_submit.apply(this); }; } catch(ErrorMessage) { console.error('spFormElementPrototype() Error attaching to HTMLFormElement.prototype.submit: ’ + ErrorMessage); } try { if (typeof __doPostBack == ‘function’) { var sp_old__doPostBack = __doPostBack; __doPostBack = function(eventTarget, eventArgument) { try { var spEvent = document.createEvent(‘Event’); spEvent.initEvent(‘sp_submit’, true, true); window.dispatchEvent(spEvent); } catch(ErrorMessage) { console.error('spFormElementPrototype() Error sending “sp_submit” event from __doPostBack(): ’ + ErrorMessage); } sp_old__doPostBack(eventTarget, eventArgument); }; } } catch(ErrorMessage) { console.error('spFormElementPrototype() Error attaching to __doPostBack(): ’ + ErrorMessage); } })();

I have to revert the template to get rid of it.

I have tried 3 different browsers.

Hi Martin, I just attempted an edit to your ticket template but it allowed me to make changes without any error. Can you send in a screen recording of your steps https://recordit.co/ to help@syncromsp.com?

I looked back at a previous ticket which was for the same problem ( I had forgotten I had it before) and the solution was to use an in private browser session. It worked!

1 Like