"Empty strings are not allowed" error while upgrading development environment to 9.0.2

I'm following the upgrade guide for 9.0 update 2, and have installed the update with the wizard. When I try to load the site I get the following error:

I assumed this referred to an empty connection string in ConnectionStrings.config but all the connection strings are defined. I can't find any other connectionString parameter that could be triggering this error. Has anyone seen this before and know what's causing it? Alternatively can anyone suggest a way of finding the source of the error?

  • Sitecore is trying to connect to LinkDatabase, this is in a config value: defaultLinkDatabaseConnectionStringName

    This is normal in the App_Config/Sitecore.config
    you should have this:

    line 6
    <sc.variable name="defaultLinkDatabaseConnectionStringName" value="core" />
    <sc.variable name="defaultLinkDatabaseConnectionStringName" role:require="ContentDelivery or ContentManagement">
    <patch:attribute name="value">web</patch:attribute>
    </sc.variable>

    line 407:

    <!-- LINK DATABASE -->
    <LinkDatabase type="Sitecore.Data.$(database).$(database)LinkDatabase, Sitecore.Kernel">
    <param connectionStringName="$(defaultLinkDatabaseConnectionStringName)" />
    </LinkDatabase>


    So check your config files for "defaultLinkDatabaseConnectionStringName"  and the <LinkDatabase tag, looks like this is currently empty.

     

    Also wise follow best practice never change anything in the sitecore.config, always modify with a patch file below the include folder. so be sure you have all original Sitecore config files unmodified.

  • In reply to Jan Bluemink:

    Thank you for the reply. Our sitecore.config has not been altered, but something is not working with the variable replacement. If I replace the above section with the following:

    <!-- LINK DATABASE -->
    <LinkDatabase type="Sitecore.Data.SqlServer.SqlServerLinkDatabase, Sitecore.Kernel">
    <param connectionStringName="core" />
    </LinkDatabase>

    It works correctly. I think maybe I haven't defined the server role correctly. I have an external appsettings file, referenced in the web.config:

    <appSettings file="App_Config\Company.AppSettings.config" />

    And placed the following in my Company.AppSettings.config file:

    <appSettings xmlns:xdt="schemas.microsoft.com/XML-Document-Transform">
    <add key="role:define" value="Standalone" />
    </appSettings>

    I suspect this isn't getting picked up, which breaks the role-based connection string. In any case, you've put me on the right track.