Sitecore Forms rendering renders content from Master
database not from Web
database. How to configure it to render published content?
2 Answers
Please check your sitecore.config
or SiteDefinition.Config
or any custom config that what database is set for your site. It should be web.
And then try to run showconfig page by going to https://hostname/sitecore/admin/showconfig.aspx
and search for your website and check, the database should be set web here.
-
-
Please accept the answer if this works for you, so in future anyone else will face the same issue, they can also see this. Oct 21, 2022 at 9:04
As Meenu suggested you can check your sitecore.config
or siteDefinition.Config
what database is set there
<site patch:before="site[@name='website']"
name="yourSite"
hostName="local.yourSite.com"
targetHostName="local.yourSite.com"
rootPath="/sitecore/content/Your Site"
startItem="/Your Site"
database="master"
domain="extranet"
allowDebug="true"
cacheHtml="false"
htmlCacheSize="10MB"
registryCacheSize="0"
viewStateCacheSize="0"
xslCacheSize="5MB"
filteredItemsCacheSize="2MB"
enablePreview="true"
enableWebEdit="true"
enableDebugger="true"
disableClientData="false"
enableCustomErrors="false"
dictionaryDomain="{000000-0000-0000-0000-00000000}"/>
As shown in above configuration if database is set to master
then content will render from master
database, and if database is set to web
in that you have to published your content related to forms data then content will render from web
database.
Hope this helps you.