We took a backup of production site and restored it on our development server. The site has been developed on OOB or SharePoint Designer with no custom development on it. The restoration process went fine with no errors thrown.

But when we try to save item in any list the console throws error that:

PreSaveItem is not defined

I checked and found that there is not custom JavaScript code in either PreSaveItem or PreSaveAction written. The items are getting saved on production site completely fine.

It seems that the library where PreSaveItem function is defined is absent. But I am not able to pinpoint anything over here. Any possible leads on how should this problem be approached? Anything we can make sure to verify that the restoration process was error free?


1 Answer 1


I can't test for SP2010

PreSaveItem is declared in forms.js and available on all EditForm.aspx and NewForm.aspx pages by default. It is loaded with a script tag in the aspx file head; immediatly after clientforms.js

Compare the header of a NewForm.aspx from a newly created List with your aspx file

It is not a very special function:

function PreSaveItem() {
 a: ;return "function" == typeof PreSaveAction ? PreSaveAction() : true

I can only presume your aspx files are modified

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.