sitecoresitecore8.2

Sitecore WFFM CD gives "Could not find configuration node: databases/database[@id='master']"


Sitecore WFFM page in CMS (connected to Master) works. In CD all pages works but when we go a WFFM page we get error Could not find configuration node: databases/database[@id='master'] It looks like WFFM in CD is looking into Master. In the connection string there is no master as it is CD. I think this config is causing issue (Sitecore.Marketing.Definitions.MarketingAssets.Repositories.config). Am I missing any steps in deploying to CD?

This error was shown in page(some part of it):

Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert) +615 Sitecore.WFFM.Abstractions.Dependencies.DependenciesManager.Resolve(String path) +24 Sitecore.Form.Core.Ascx.Controls.SimpleForm..ctor() +26 Sitecore.Form.Web.UI.Controls.SitecoreSimpleForm..ctor(Item item) +21

This is taken from error logs

Exception: System.InvalidOperationException Message: Could not find configuration node: databases/database[@id='master'] Source: Sitecore.Kernel at Sitecore.Configuration.DefaultFactory.GetConfigNode(String xpath, Boolean assert) at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert) at Sitecore.Configuration.DefaultFactory.GetDatabase(String name, Boolean assert) at Sitecore.Configuration.DefaultFactory.GetDatabase(String name) at Sitecore.Marketing.Definitions.Goals.Data.ItemDb.GoalDefinitionItemRepository..ctor(String databaseName, Boolean assumeActive, IDefinitionRecordMapper`1 mapper) at Sitecore.Marketing.Definitions.Goals.Data.ItemDb.GoalDefinitionItemRepository..ctor(String databaseName, Boolean assumeActive)


Solution

    1. Make sure this is done: (taken from official installation guide) Extra steps WFFM for Content Delivery (CD) Servers:

    Copy the contents of "Web Forms for Marketers CD 8.2 rev.170413.zip" file into the web root On all the CD servers, in the \Website\App_Config\Include\Sitecore.Forms.Config file, remove or disable the following sections: In the section, remove: enter image description here In the section, remove: enter image description here

    Add the following node to the section:

     <setting name="WFM.IsRemoteActions" value="true" />Make sure this setting is set as follows. <setting name="WFM.MasterDatabase" value="web" />
    
    1. SwitchMasterToWeb.config this might require customization. So first you would need to check the log file. In our case we found that some "master" reference was not added in SwitchMasterToWeb.config so we had to add it(that way master is changed to web). Some people contact Sitecore directly and Sitecore gave it customised for them. as given here