2

I am facing an issue with WFFM form submit action. When there are more than one language version for forms and when I navigate to the version other than the parent language version and on submitting the form, its getting redirected to parent language version.

For e.g. If there is an item in English version which is the parent language and submit the form from German version of the same item, then the page will get redirect to English version on submit.

This happens only in CD environment. In CM its working as expected. On success action its mentioned to show message only.

In vanilla instance of sitecore this issue is not reproducible and is working as expected.

I have gone through some dll's like Wffm.Forms.Custom.dll, core dll etc but not able to find where this redirection is happening. Please provide some help on this.

Details of my environment:

Sitecore version : 8.1 (rev. 151207)
WFFM version : 8.1 (rev. 151217)
.NET Framework : 4.0

2 Answers 2

1

Possible areas to look for customizations is in the pipeline "successAction". The pipeline processors "SuccessRedirect" and "FormatSuccessMessage" are in the Sitecore.Forms.config file.

(The code is located in Sitecore.Form.Core.dll and the namespace is "Sitecore.Form.Core.Pipelines.FormSubmit")

If you are using MVC, make sure to look in the Sitecore.MvcForms.config for anything custom that may be highjacking things.

Questions:

  • If the form is supposed to redirect, are you sure the that the item the form is redirecting to isn't falling back to English? Is there a German Version?
  • Did you look at all the items on CD and make sure everything published correctly?
  • Is the German form item configured the same in all environments.
  • Is the vanilla instance of Sitecore set up with the same server configuration as the CM/CD environment where it's not working?
  • Does the vanilla instance have the same items as CD along with the same WFFM configs?
  • Are there any customizations to the WFFM pipelines?
  • Are there any custom Save Actions or Form Verifications that could be interfering with the submission?
  • Are the configurations basically the same in all environments?

Personally, I've experienced a lot of weird behavior with WFFM on 8.1 with multiple languages. Language Fallback was extremely buggy prior to version 8.1 update 3. It was a nightmare... oh the headaches it caused.

I think the issue could be related to items not publishing or Language Fallback.

1

Finaly I got a fix for this issue. Added the following lines in attributes variable in FormViewModel.cshtml file (Views\Form\EditorTemplates\FormViewModel.cshtml)

    { "enctype", "multipart/form-data" },
    { "class", @Model.CssClass },
    { "id", Model.ClientId },
    { "role", "form" },
    { Sitecore.Forms.Mvc.Constants.Wffm, Model.Item.ID },         
    {"action", Sitecore.Links.LinkManager.GetItemUrl(Sitecore.Context.Item)}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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