Upgrading Sitecore Module from 2.0.0 to 3.0.0


How to upgrade from Sitecore Module v2.0.0 to v3.0.0

The SearchStax Site Search solution has released the latest version of its SearchStax for Sitecore package which contains several new features and bug fixes. If you are still using SearchStax for Sitecore 2.0.0 you should think about upgrading it in order to leverage all this. This document shows how you can upgrade from a previous version to 3.0.0.

Start by downloading SearchStax for Sitecore 3.0.0 version from here.

There are a few changes in the structure of the SearchStax configuration files between versions 2.0.0 and 3.0.0, so please move this file to a separate folder where it won’t be overwritten:

  • \App_Config\Modules\SearchStax\SearchStax.Connector.Provider.config

Then delete all the config files in the following folder:

  • \App_Config\Modules\SearchStax

Open your Sitecore instance and install the SearchStax for Sitecore 3.0.0 package using the Sitecore Installation Wizard.

Make sure you select “Yes to all” when asked to overwrite files:

Make sure you select “Apply to all” and “Overwrite” to overwrite all the items already in Sitecore.

Importance of Overwrite

Choosing to OverWrite files is important as there could be dependencies on DLLs, configs, and so forth with the newer versions. You can always copy your custom settings from the backup folder that you created as you started the upgrade.

Once the installation is finished, open the configuration page, and recreate the SearchStax indexes you need to be part of your Sitecore instance.

If you have custom attributes that were previously added to your indexes, such as computed fields, you can use the original 2.0.0 SearchStax.Connector.Provider.config file backed up at the beginning of this upgrade process to bring those changes to the new version of this file.

Keep in mind that we can’t simply overwrite the new file with the old one, since there are some structural changes on it as part of this new 3.0.0 release. Doing so would make your Sitecore instance not work properly.

Open both versions of the SearchStax.Connector.Provider.config  file (the backed up version and the new 3.0.0 version present on the \App_Config\Modules\SearchStax folder) and manually bring your customizations to the new one by using a text-editor program.

Example:

After doing so, open every search page using /sitecore/templates/Feature/SearchStax/SearchPage/SearchStaxPage template and use the SearchStax Index field to select which previously created index this given page should use when searching for results.

Rebuild all your SearchStax indexes using the Sitecore index manager.

Publish your website and you should now be able to use the search page without any issues.

Questions?

If you are seeing errors like:

DefaultSolrSearchIndexesInitializer: Contruction has failed.
Exception: SolrNet.Exceptions.InvalidURLException
Message: Invalid URL ''
Source: SolrNet
at SolrNet.Utils.UriValidator.ValidateHTTP(String s)
at SolrNet.Impl.SolrConnection..ctor(String serverURL)
at Sitecore.ContentSearch.SolrNetExtension.Impl.SolrConnectionEx..ctor(String serverUrl, Boolean usePostConnection)
at SearchStax.Feature.Connector.Provider.SearchStaxSearchIndex.GetSolrAdmin()
at SearchStax.Feature.Connector.Provider.SearchStaxSearchIndex.GetConnector()
at SearchStax.Feature.Connector.Provider.SearchStaxSearchIndex.InitializeSolr()
at Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.InitializeIndexSystem()
at Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.Initialize()
at Sitecore.ContentSearch.SolrProvider.Initialization.DefaultSolrSearchIndexesInitializer.ConstructIndexSafe(SolrInitializableIndex index)

Nested Exception

Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: uriString
Source: System
at System.Uri..ctor(String uriString)
at SolrNet.Utils.UriValidator.ValidateHTTP(String s)

there could be DLLs missing – like the RestSharp.dll that comes packaged with the module. Please reinstall making sure you follow the instructions to overwrite files as mentioned in the instructions.

Do not hesitate to contact the SearchStax Support Desk.