submit functionality stopped working

Yang Wen asked on September 21, 2015 20:06

The contribution list web parts on our site have worked fine for several months. However it appears now it's broken on submit of the form. The same error is occurring with the contribution list web part on multiple pages, so it's not caused by changes specific to a single page. I have been looking at various settings and can no identify a potential root cause.

It also appears that any web part with a submit functionality also no longer submits. The submit btn does nothing on click(no console errors either). On the server side, no Kentico event logs are created for them.

Is there a global setting that can potentially affect all of these functionalities?

Error log below was generated on clicking "Add" of the contribution list form:
Note - When submitting the form, all fields were populated despite what the message says.

EventType: E
Source: Content
EventCode: SaveDocument
EventDescription: An error occurred when saving data. Please see event log for more details.
Message: Value cannot be null.
Parameter name: input
Exception type: System.ArgumentNullException

Stack Trace: 
   at System.Text.RegularExpressions.Regex.Replace(String input, String replacement)
   at CMSFormControls_Basic_HtmlAreaControl.get_ValueForValidation()
   at CMS.FormControls.FormControlValidation.LoadControlValue()
   at CMS.FormControls.FormControlValidation.Validate()
   at CMS.FormControls.BasicForm.ValidateData()
   at CMS.FormControls.CMSForm.DocumentManager_OnValidateData(Object sender, DocumentManagerEventArgs e)

at System.EventHandler 1.Invoke(Object sender, TEventArgs e) at CMS.FormControls.CMSAbstractManager`2.RaiseValidateData(EventArgsType args) at CMS.FormControls.CMSDocumentManager.SaveDocumentInternal(String actionContext)

Correct Answer

Brenden Kehren answered on September 21, 2015 22:55

Not only could it be a JS issue but it could also be a content issue. I've seen several issues with content editors think they can simply place <form>some form fields and values here</form> on a page and thing it will just work. This isn't the case. For these unique issues it typically requires a bit more research, sorry.

2 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on September 21, 2015 20:15

It could strictly be content related, meaning some content on that page is causing an invalid post or has invalid javascript on it. Maybe you have an invalid RegEx?

1 votesVote for this answer Mark as a Correct answer

Maarten van den Hooven answered on September 21, 2015 22:07

I agree with Brenden that it seems to be content related, is there really not changed anything? If so look what is changed even if it seems farfetched and start you investigation there.

But we had two weeks almost the same error on an website that didn't changed for the last couple of months. We searched and searched and couldn't find anything. As last attempt we restarted the application (system -> restart application) and we don't why buy magically it worked. Strange but maybe it is worth the try.

1 votesVote for this answer Mark as a Correct answer

Yang Wen answered on September 21, 2015 22:47

Ok I dropped a MessageBoard webpart on a dummy page that doesn't inherit the site's master page, and the submission worked!

however I've also eliminated our custom JS library from the masterpage and it had no effects on the submission error. I'll keep looking.....

0 votesVote for this answer Mark as a Correct answer

Maarten van den Hooven answered on September 21, 2015 22:53

Dear Yang Wen, Yes that's the best way to check it, debugging by elimination. Hopefully you will find quickly the source of the problem. Let us known if you find it.

Again good luck :-)

0 votesVote for this answer Mark as a Correct answer

Yang Wen answered on September 23, 2015 10:15 (last edited on September 23, 2015 10:15)

Ok found the culprit!

Recent changes introduced non server-side form tags on the page. these forms elements were effectively nested inside the asp.net's server-side form.

Changed the form elements to DIV resolved the issue.

Thanks all!

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.