Recently I got a fun question from a fellow dev: After pulling some changes and doing a sync of serialised data they were expecting to see some forms in the Experience Forms editor so they could work on them. But nothing was showing up... The root cause here is a bit of a classic issue that many people will have seen before, but it still seemed worth writing it up. Even if just to emphasise that this has been around for a while and it's still a thing even if you're using containers.
The instance in question was v10.4 running in Docker, and the dev had pulled some updates to a branch, run
docker compose up
and then synchronised the serialised items in their source tree. They'd opened Experience Forms and seen a big fat nothing:
But there was valid looking form data visible in Content Editor:
Now if you've been around a while you probably know what's up here - but this can still be confusing if you're new to Sitecore.
The key problem here (which was
documented back at the dawn of time) is that the Experience Forms UI relies on the underlying ContentSearch infrastructure to find the forms to display here. It's not finding forms by looking at the database under
/sitecore/Forms
- it's making a Solr query instead.
This was an issue with the original Experience Forms release back in Sitecore 9, and it's still a thing with 10.4 today.
Looking back through previous blog posts, I see the main log file "error" is still the same - refreshing the Experience Forms manager with the search not working gives:
2660 16:03:04 WARN Cannot resolve the scope because the item set is empty.
But it looks like the front-end messages have changed now. Back in the day the page appeared to have JavaScript errors relating to failing to initialise a database. But today we don't see the same thing. Spinning up a fresh 10.4 instance to check, the only message I saw when refreshing this page with the JS console open was:
or for Google's benefit:
Uncaught ListControl error: Tiletemplate "/sitecore/shell/client/Applications/FormsBuilder/Layouts/Performance/MetricsTiles/MetricsTile.html" was not found.
However that error message did not go away when I fixed the search issue on this instance - which makes me think it is unrelated.
The overall fix, however, remains the same: You need to have ContentSearch all working properly. So if your project is running in Docker, that probably means checking things like:
Now when you're using Docker it's important to remember that your Solr state can be easily reset by deleting the files in the persistent volume at
docker\data\solr
in your solution. So stuff like "clone a branch to a new folder for a test" or "run the
clean.ps1
script" can mean you need to remember to deploy the schema and build the indexes again.
I guess we're kind of stuck with this issue now, since it's been around so long. But it would be nice if we got a proper UI message at least...
↑ Back to top