lesson-learned

Sitecore 9 Update 2 – Why are my Sitecore Forms not displayed?

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.”

forms_1

Let’s have a look at the Sitecore content tree in Content Editor application. Hmm, it’s there!

forms_2

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
    • forms_3
  • 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!

forms_4

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:

forms_8

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:

forms_7

OR

forms_9

 

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!

 

 

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.