For this project, our goal was to implement simple Sitecore 9 forms that would create new profiles and trigger the goal on submission. Unfortunately, this post is not an instruction on how to do that! What we’ll talk about today is the list of issues we found and how to troubleshoot Sitecore 9 Analytics and Forms. We documented our progress until we figured it all out. Hopefully, this will help you on your journey too!
Issue 1: Database is being recovered. Waiting until recovery is finished.
Starting the website locally would crash with a YSOD and error “Database is being recovered. Waiting until recovery is finished.”
- Check to see if SQL service is running
- If SQL service is running, check to see if your database is set to auto-close. When AUTO CLOSE option is set to true, SQL Server Database Engine will close the user database after its use. The database will be turned ON the next time someone wants to access the database.
Issue 2: Error when rebuilding reporting database
There are several things that could cause an issue when rebuilding a reporting database. You need to make sure that your Sitecore license supports xconnect, that your Solr service is running and that Solr is connecting through https. If ALL of that is correct, you can navigate command prompt to yoursite.xconnect\App_data\jobs\continuous\IndexWorker and run this command “XConnectSearchIndexer -rr”
This was the error we were getting:
Unhandled Exception: System.AggregateException: One or more errors occurred. —&gt;
System.Net.Http.HttpRequestException: An error occurred while sending the request. —&gt;
System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine…
Check your Solr version and Sitecore compatibility table. Upgrading Solr from 6.6.1 to 6.6.2 resolved this issue.
Issue 3: Individual experience profiles are all showing that an error has occurred
This message doesn’t give you much information, so you need to search through the Sitecore logs.
We found this error in our logs:
7520 2018:08:20 12:54:57 ERROR [Sitecore Services]: HTTP GET
URL http://*****/sitecore/api/ao/v1/contacts/search?&amp;pageSize=20&amp;pageNumber=1&amp;sort=visitCount desc&amp;match=*&amp;searchfromdatefilter=21%2F07%2F2018&amp;searchtodatefilter=20%2F08%2F2018&amp;searchchannelfilters=null&amp;searchcampaignfilters=null&amp;searchoutcomefilters=null&amp;searchgoalfilters=null&amp;searchprofilefilters=null&amp;searchdevicefilters=null
Exception System.NullReferenceException: Object reference not set to an instance of an object.
at Sitecore.Cintel.Endpoint.Plumbing.NegotiateLanguageFilter.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
at System.Web.Http.Filters.ActionFilterAttribute.OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken)
— End of stack trace from previous location where exception was thrown —
We revisited our profiles implementation and found out that we didn’t have any pattern cards. Creating a default pattern card item resolved the issue.
Issue 4: Where are my forms? “There are no forms to display” in Forms designer
You created a new Sitecore form, saved it and published. However, if you reload Forms Designer the form is gone – and there is a message that says “There are no forms to display”.
Rebuild the master index and check again.
Issue 5: Where did my data go? The default submit button saved data to a csv file and you need them in your contacts (or somewhere else)
If you created a form with default submit button your data will be saved in a csv file and you can export them from Forms designer. This is expected and it works without issues. However, if you need those data somewhere else you will need to implement custom submit action.
Issue 6: Custom submit action doesn’t work
To create a custom submit action, you need to inherit SubmitActionBase class and overwrite Execute forms.
It is important which order you put submit actions on your form. So if you put custom action after redirect page action, the custom action will never execute.
If your custom action always returns error message you need to revisit your code.
If you used a string as type parameter in SubmitActionBase, like this
public class CustomSubmit : SubmitActionBase&lt;string&gt;
Then you need to overwrite TryParse method as well
protected override bool TryParse(string value, out string target)
target = string.Empty;
TryParse executes before Execute method and if the value is empty it will return false and skip Execute method. More details about this issue you can find on João Neto’s blog
Issue 7: Sitecore Rocks cannot connect to Sitecore 9 instance
Sitecore rocks cannot overwrite Sitecore 9 security settings. This is a known issue and documented here https://github.com/JakobChristensen/Sitecore.Rocks/issues/68
Edit Web.config and authorize all users to access WebService:
&lt;allow users="?,*" /&gt;
Issue 8: Cannot add new Speak item in Sitecore rocks
Add new dialog is stuck on loading.
Right Click on your Connection, then click to Connections/Modify Connection and select Hard Rock Web Service as Data Provider. Click OK.
Go back to your code, with Sitecore rocks edit your custom dialog (right click/ tasks/design layout) and find PageCode component. Set SpeakCoreVersion property to SPEAK 2-x
I hope this list is helpful for you and speeds up your development. Happy coding!