We recently performed a successful upgrade and migration from Sitecore 8 to 9. It went quite well, but wasn’t without challenges. Some examples of those challenges were the migration of custom dynamic placeholders (which now come out-of-the-box with Sitecore 9), switching to Solr as a search provider, and with architectural changes after the introduction of xConnect.

One thing we noticed was that our preview publishing target site was coming up, but not showing any of the content associated with the renderings. After some looking into Sitecore configuration changes, there are a couple of things Sitecore requires if you are defining a site.

This is the error we got at first:

Could not find configuration node: PropertyStoreProvider/store[@name='sitename']

The PropertyStoreProvider has been in Sitecore for quite a while. However, I don’t think it was really required to be defined for any sites until Sitecore 9. So, in order to get past the error, we defined the provider for our site by adding the following to the configurations (inside the <sitecore> node).

<store name="sitename" prefix="sitename" getValueWithoutPrefix="true" singleInstance="true" type="Sitecore.Data.Properties.SqlServerPropertyStore, Sitecore.Kernel">
<param ref="dataApis/dataApi[@name='SqlServer']" param1="$(name)"/>
<param type="Sitecore.Abstractions.BaseEventManager, Sitecore.Kernel" resolve="true"/>
<param type="Sitecore.Abstractions.BaseCacheManager, Sitecore.Kernel" resolve="true"/>

Also, we had to add the “PropertyStore” definition inside the <database> node for our site, as follows.

<PropertyStore ref="PropertyStoreProvider/store[@name='$(id)']"/>

The preview site came up after this, but we noticed that the content was missing from the renderings. After review of the logs, we noticed errors like this:

10360 15:42:25 ERROR There is no appropriate index for /Home - {B09E3222-5A8E-493C-9E52-38D284516C37}. You have to add an index crawler that will cover this item
10360 15:42:25 WARN  Failed to execute datasource query Sitecore.ContentSearch.Exceptions.IndexNotFoundException: Index (EMPTY) was not found
at Sitecore.ContentSearch.ContentSearchManager.GetIndex(String name)
at Sitecore.Mvc.ExperienceEditor.DatasourceValidator.DatasourceValidator.IsDatasourceValid(String dataSource, Database database)
10360 15:42:25 WARN  '{E9231440-F52D-433E-8BBD-EB63C1A8CDE9}' is not valid datasource for sitename or user does not have permissions to access.

After looking into more configurations, it seems Sitecore 9 uses the indexes to optimize getting data sources for renderings, and so we needed to add an index for our site (which was not needed in Sitecore 8). That’s fairly easy to do, and here are high-level steps. You’ll need access to the file system on the Solr server to follow these steps.

  • Go to the directory on the Solr server where the indexes are stored.
  • Create a new folder following the naming convention of the other indexes.
  • Copy the “conf” folder from one of the other indexes into the new index folder.
  • Copy the “core.properties” file from one of the other indexes into the new index folder.
  • Open the “core.properties” file and modify the information in there for your new index.
  • Create an empty “data” folder inside the new index folder.
  • Restart the Solr service.

If everything was done correctly, you should see a new and empty index in Solr.

Now back to Sitecore… We then added configuration for the new index for our preview site’s database as follows (inside the <sitecore>/<contentSearch>/<configuration>/<indexes> node).

<index id="sitecore_sitename_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
<param desc="name">$(id)</param>
<param desc="core">sitecore_sitename_index</param>
<param ref="contentSearch/indexConfigurations/databasePropertyStore" desc="propertyStore" param1="$(id)"/>
<configuration ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration"/>
<strategies hint="list:AddStrategy">
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/intervalAsyncCore"/>
<locations hint="list:AddCrawler">
<crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">

Once that was done, we rebuilt the indexes for the preview site and everything came up as expected.