1

I am working with Sitecore Forms. The forms submit without any error while previewing within experience editor for both Master and Web databases. But, when I check in a Content-Delivery (CD) URL locally by adding my IP in IIS, I am getting the following error, and the form also does not submit as expected. Error Message Sitecore version: 9.1.1

This error was displayed while in the Console section (Chrome browser - Inspect menu option) as 500 Internal Server error.

While searching the internet, I found that the models should not have two keys, but I have verified all my code, there are no two variables with the same name (such as username and UserName)

Please assist. Thanks!

  • did you check if you drag and drop fields with field name ? – Vlad Iobagiu Jul 22 '19 at 14:25
  • I know that there is a similar SO question [here] (sitecore.stackexchange.com/questions/5455/…). But, that refers to WFFM and also an old thread – Paulson Maclean Jul 22 '19 at 14:26
  • Hi @VladIobagiu, thanks for your reply! I have checked the fields names, they are unique. – Paulson Maclean Jul 22 '19 at 14:28
  • @PaulsonMaclean we had the same issue because of a redirect implementation in the httpRequestBegin pipeline. I would suggest to you to check the custom httpRequestBegin processors and disable IIS Rewrite if you have it enabled. – Tamás Tárnok Jul 24 '19 at 7:21
2

SOLUTION : Again I got this error, even when trying with the Sitecore instance CD URL now.

Correcting the Server Name in the following tables of the Shard Databases for my Sitecore instance fixed the issue

DATABASE NAME > TABLE NAME > COLUMN NAME
sc92_Xdb.Collection.Shard0 > _shardManagement.ShardsLocal > ServerName
sc92_Xdb.Collection.Shard1 > _shardManagement.ShardsLocal > ServerName
sc92_Xdb.Collection.ShardMapManager > _shardManagement.ShardsGlobal > ServerName

The error details (An item with the same key…) were not enough to resolve the error, because there were no two fields with the same field name in the Forms item. When I checked the XConnect logs, we found that there was a problem in the xDB connection as below:

Sitecore.Xdb.Collection.Failures.DataProviderException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

That was why adding a contact to xDB (form’s custom submit action code does that) or listing the contacts in the Experience Profile was throwiing the above errors.

OUTCOME
After correcting the server name in the above three tables, the Experience Profile error was resolved and the form submitted without any error in the browser console.

Special Thanks to : http://sitecoreworld.blogspot.com/2018/11/error-xdbcontextloggingplugin.html

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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