There is a Sitecore 9.0 Update 2 project on our table which was upgraded from Sitecore 7.1 Update 1 (there were quite many complicated web forms based on WFFM – Web Forms For Marketers module – and there were no helpful tool such as WFFM-Conversion-Tool at that moment so we decided to upgrade it to last Sitecore version supports WFFM).
We always want to do new things and this time, we have a chance to play around with Sitecore Forms. It’s a built-in module available on Sitecore 9.0 Initial Release and later.
Obviously, we can easily create a form + add fields to it and then save it successfully. However, we cannot see it on Forms application as “There are no forms to display.”
Let’s have a look at the Sitecore content tree in Content Editor application. Hmm, it’s there!
It happens on all environments and the Sitecore server role is Standalone so it must be fixed at all cost. Generally, it’s a well-known issue, for instances:
- https://kb.sitecore.net/articles/891856 (Sitecore Forms are not displayed in the Forms application)
- as our Sitecore version is 9.0 Update 2, the Scenario 1 looks promising. Nevertheless, we quickly find out that indexAllFields setting is set to true on our Sitecore instance so it does not solve the problem
- due to NOT configure new Forms folder ID if any in /sitecore/client/Applications/FormsBuilder/Components/Navigation/Create/PageSettings/CreateFormDataSource/SearchConfig (core database) => it’s not our case as well because we’re using the default Forms folder shipped with Sitecore package
So far so unfortunately, it’s time to have a deeper dive into Sitecore log and then we notice this warning message “Cannot resolve the scope because the item set is empty.” is written down on every single time we access Forms application. Again, it’s a known-issue and already fixed in Sitecore version 9.0.2 (Note: we also set up a fresh Sitecore version 9.0.2 instance to verify it).
Okay, we’re aware that there is something missing in the Sitecore index, it’s specifically sitecore_master_index. Most likely, we messed it up by registering the custom index fields via Sitecore patch config file so we remove it out of Sitecore instance and then rebuild sitecore_master_index. Wow, it works properly now!
Turns out, we accidentally replace fieldmap and documentOptions elements in the default index configuration file by deploying our own Sitecore patch config file to the Sitecore instance:
Our fix is to ensure that there is ref attribute on those elements so they can reference the default ones instead of replacing them all:
Notes: the above examples are for Lucene search so the element is defaultLuceneIndexConfiguration
- for SOLR search: defaultSolrIndexConfiguration
- for Azure search: defaultCloudIndexConfiguration
Happy Sitecore Lesson-learned!