5

We have a multi server environment with 2 CM and 4 CD servers. We are working on Sitecore 8.1 Update3 and WFFM for 8.1 update 3.

The issue we are facing is related to the WFFM File Upload control not working on the CD servers.

The custom Save Action code is calling Execute method but the CD servers are actually not able to read the Uploaded File. I checked in the CM server and the uploaded file is actually saved in the Master Database, but the CD servers are unable to process the request since the files are not getting saved in the Web database.

Currently, we are receiving error message stating –

6024 15:07:07 INFO AUDIT (extranet\Anonymous): [WFFM] Form {604586CC-BA15-4B08-9C09-599E6F61EA77} is saving to db

6024 15:07:07 WARN [WFFM] Index was outside the bounds of the array. Exception: System.IndexOutOfRangeException Message: Index was outside the bounds of the array. Source: TW.Web at TW.Web.WffmForm.SupplierContact.Execute(ID formId, AdaptedResultList adaptedFields, ActionCallContext actionCallContext, Object[] data)
at Sitecore.Forms.Core.Dependencies.DefaultImplActionExecutor.ExecuteSaving(ID formID, ControlResult[] fields, IActionDefinition[] actionDefinitions, Boolean simpleAdapt, ID sessionID)

Can any one please help me in making the config updates that is responsible for the CD servers to read the Uploaded WFFM Files.

I have already made all the updates available on the WFFM installtion guide for multi server setup.

  • Do your Custom Save action actually need to run on the CD servers? Can they not run on the CM server, then they would be able to directly read the saved file? – jammykam Dec 29 '16 at 12:49
  • Thanks for your updates on this. I am able to now upload the file through the WFFM File Upload control and i can also see the uploaded file in Sitecore Media Library. I am now facing another issue - after the upload is done, HttpContext is getting as null. I need to redirect the user to a success/failure page but since HttpContext is null, my redirection is not working. If i do not upload my file the redirection works. Any thoughts on what i could be missing for this file upload? – Amit Gaurav Mar 28 '17 at 8:38
  • You most likely need to tap into the wffm.success pipeline: sitecore.stackexchange.com/a/703/135 If that does not help you then ask another question. – jammykam Mar 28 '17 at 11:41
4

The custom Save Action code is calling Execute method but the CD servers are actually not able to read the Uploaded File. I checked in the CM server and the uploaded file is actually saved in the Master Database, but the CD servers are unable to process the request since the files are not getting saved in the Web database.

Make sure of two things:

1) Media is stored in database (not as files)

2) You publish the file from master to web after upload OR save it to both databases

1

Did you enable this option in save action which is meant to perform actons in CD server. enter image description here

0

Further to Balaji's answer, this is documented in this WFFM reference :

Client Action — is used only in the staging environment. If this check box is clear, this Save Action is transferred from the Slave to the Master server and performed there. If this check box is selected, the Save Action is performed on the Slave server.

In the absence of that option, I'd imagine it is trying to access the master db and related dependancies (indexes, etc). The error message you provided seems likely to be related to that missing config.

  • OK - should that mean like providing access to Master DB also for the CD environments? – Amit Gaurav Jun 22 '17 at 9:33

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.