2

I'm working in an 8.1 (rev. 151207) instance. I have WFFM installed for the current version. In my production delivery instance I am getting an error when trying to use the file uploader but only when a file is attached to that field. The error notes that there isn't a reference to the master database. I thought that setting the WFM.MasterDatabase setting to the delivery server's database on the delivery server would resolve this issue. For some reason I'm still getting that same error though. Is there a different way to tell the file uploader to target a specific database?

It's also worth noting that items are created in the database specified but they have no versions in any language (the form is being filled out on a site that has a default language set to German).

I saw some mentions of needing an additional connection string for people running into a similar issue but it seems that this dependency was removed in 8.0 update 2 (https://dev.sitecore.net/Downloads/Downloads/Web%20Forms%20For%20Marketers/Web%20Forms%20for%20Marketers%2080/Release%20Notes.aspx#update2).

Error in logs:

5444 05:12:00 WARN  [WFFM] Exception has been thrown by the target of an invocation.
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
   at Sitecore.Reflection.ReflectionUtil.SetProperty(Object obj, String name, Object value)
   at Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[] properties)
   at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
   at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
   at Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert)
   at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
   at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
   at Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert)
   at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
   at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
   at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
   at Sitecore.Search.SearchManager.get_SearchConfiguration()
   at Sitecore.Data.Managers.IndexingManager.UpdateIndexAsync(Database database)
   at Sitecore.MainUtil.RaiseEvent[T](EventHandler`1 subscribers, Object sender, T eventArgs)
   at Sitecore.Data.Engines.HistoryEngine.RegisterItemCreated(Item item)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at Sitecore.Data.Engines.EngineCommand`2.RaiseEvent[TArgs](EventHandler`1 handlers, Func`2 argsCreator)
   at Sitecore.Data.Engines.DataCommands.CreateItemCommand.Executed()
   at Sitecore.Data.Engines.EngineCommand`2.Execute()
   at Sitecore.Data.Engines.DataEngine.CreateItem(String itemName, Item destination, ID templateId, ID newId)
   at Sitecore.Data.Managers.ItemProvider.CreateItem(String itemName, Item destination, ID templateId, ID newId, SecurityCheck securityCheck)
   at Sitecore.Data.Managers.PipelineBasedItemProvider.<>c__DisplayClass13.<CreateItem>b__12()
   at Sitecore.Data.Managers.PipelineBasedItemProvider.ExecuteAndReturnResult[TArgs,TResult](String pipelineName, String pipelineDomain, Func`1 pipelineArgsCreator, Func`1 fallbackResult)
   at Sitecore.Data.Managers.ItemManager.CreateItem(String itemName, Item destination, ID templateId, ID newId, SecurityCheck securityCheck)
   at Sitecore.Data.Managers.ItemManager.CreateItem(String itemName, Item destination, ID templateId, ID newId)
   at Sitecore.Nexus.Data.DataCommands.AddFromTemplateCommand.(String , Item , ID , ID )
   at Sitecore.Data.Engines.DataCommands.AddFromTemplateCommand.DoExecute()
   at Sitecore.Data.Engines.EngineCommand`2.Execute()
   at Sitecore.Data.Engines.DataEngine.AddFromTemplate(String itemName, ID templateId, Item destination, ID newId)
   at Sitecore.Data.Managers.ItemProvider.AddFromTemplate(String itemName, ID templateId, Item destination, ID newId)
   at Sitecore.Data.Managers.PipelineBasedItemProvider.<>c__DisplayClass3.<AddFromTemplate>b__2()
   at Sitecore.Data.Managers.PipelineBasedItemProvider.ExecuteAndReturnResult[TArgs,TResult](String pipelineName, String pipelineDomain, Func`1 pipelineArgsCreator, Func`1 fallbackResult)
   at Sitecore.Data.Managers.ItemManager.AddFromTemplate(String itemName, ID templateId, Item destination, ID newItemId)
   at Sitecore.Data.Managers.ItemManager.AddFromTemplate(String itemName, ID templateId, Item destination)
   at Sitecore.Data.Items.Item.Add(String name, TemplateID templateID)
   at Sitecore.Data.Items.Item.Add(String name, TemplateItem template)
   at Sitecore.Resources.Media.MediaCreator.CreateItem(String itemPath, String filePath, MediaCreatorOptions options)
   at Sitecore.Resources.Media.MediaCreator.AttachStreamToMediaItem(Stream stream, String itemPath, String fileName, MediaCreatorOptions options)
   at Sitecore.Resources.Media.MediaCreator.CreateFromStream(Stream stream, String filePath, MediaCreatorOptions options)
   at Sitecore.Form.Core.Media.MediaUploaderEx.UploadToDatabase(List`1 list)
   at Sitecore.Form.Core.Media.MediaUploaderEx.Upload()
   at Sitecore.Form.Core.Pipelines.FormUploadFile.Save.Process(FormUploadFileArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Form.UI.Adapters.FileUploadAdapter.AdaptResult(IFieldItem field, Object value)
   at Sitecore.Form.Core.Utility.FieldReflectionUtil.GetAdaptedResult(ID fieldID, Object value)
   at Sitecore.WFFM.Abstractions.Actions.AdaptedControlResult..ctor(ControlResult result, IFieldProvider fieldProvider, Boolean simpleAdapt)
   at Sitecore.Forms.Core.Dependencies.DefaultImplActionExecutor.<>c__DisplayClass25.<AdaptResult>b__24(ControlResult result)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Sitecore.Forms.Core.Dependencies.DefaultImplActionExecutor.AdaptResult(IEnumerable`1 list, Boolean simpleAdapt)
   at Sitecore.Forms.Core.Dependencies.DefaultImplActionExecutor.ExecuteSaving(ID formID, ControlResult[] fields, IActionDefinition[] actionDefinitions, Boolean simpleAdapt, ID sessionID)
   at Sitecore.Form.Core.FormDataHandler.ExecuteSaveActions(ID formId, ControlResult[] fields, IActionDefinition[] actions, IActionExecutor actionExecutor)
   at Sitecore.Form.Core.FormDataHandler.ProcessData(ID formID, ControlResult[] fields, IActionDefinition[] actions, IActionExecutor actionExecutor)

Nested Exception

Exception: System.InvalidOperationException
Message: Could not find configuration node: databases/database[@id='master']
Source: Sitecore.Kernel
   at Sitecore.Diagnostics.Assert.IsTrue(Boolean condition, String message)
   at Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert)
   at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
   at Sitecore.Configuration.Factory.GetDatabase(String name)
   at Sitecore.Search.Crawlers.DatabaseCrawler.set_Database(String value)


5444 05:12:00 WARN  [WFFM] Web Forms for Marketers: an exception: Exception has been thrown by the target of an invocation. has occured while trying to execute an action.
2

To use the WFFM module in multiserver environments, follow the instructions form the installation guide.

Configuring the CM Server

On the CM server:

  1. On only one of the CM servers, in the App_Config\Include\Sitecore.Forms.config file, in the <sitecore> section, check that the following node is included:
<!--HOOKS-->
<hooks>
  <!--remote events hook-->
  <hook type="Sitecore.Form.Core.WffmActionHook, Sitecore.Forms.Core"/>
</hooks>
  1. In the App_Config\Include\Sitecore.Forms.config file, in the <events> section, check that the following node is included:
<!--Remote events handler-->
<event name="wffm:action:remote">
  <handler type="Sitecore.Form.Core.WffmActionHandler, Sitecore.Forms.Core"
method="OnWffmActionEventFired" >
    <param name="actionManager" ref="/sitecore/wffm/wffmActionExecutor" />
  </handler>
</event>
  1. On each CM server, in the Sitecore.Forms.config file, in the <settings> section, check that it does not contain the following information:
<setting name="WFM.IsRemoteActions" value="true" />

Configuring the CD server

On all the CD servers:

In the \Website\App_Config\Include\Sitecore.Forms.Config file, remove or disable the following sections:

In the <sitecore> section, remove:

<!—HOOKS-->
<hooks>
  <!—remote events hook-->
  <hook type="Sitecore.Form.Core.WffmActionHook, Sitecore.Forms.Core"/>
 <hooks>

In the <events> section, remove:

<!--Remote events handler-->
<event name="wffm:action:remote">
  <handler type="Sitecore.Form.Core.WffmActionHandler, Sitecore.Forms.Core"
method="OnWffmActionEventFired" >
    <param name="actionManager" ref="/sitecore/wffm/wffmActionExecutor" />
  </handler>
</event>

In the \Website\App_Config\Include\Sitecore.Forms.Config file:

Add the following node to the section:

<setting name="WFM.IsRemoteActions" value="true" />

Configure the following node according to the name of the c0nnection string related to the target database. For example “web”.

<setting name="WFM.MasterDatabase" value="web" />

Note: this information can be entirely found in the installation guide - copied here for future guidance. I would advice you to read and follow the install manual.

1

It looks like this is a known bug with a patch: https://kb.sitecore.net/articles/091652

0

Sounds like WFFM scaling configuration issue, try checking the WFFM installation guide again especially around IsRemoteAction and the remote event handler configuration between CM and CD

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.