Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Captcha image is not rendering in sitecore web form for marketers

I am using "Web Forms for Marketers 2.5 rev. 141014", while creating a form I am taking a Captcha field, but captcha image is not rendering on front end.

Screenshot Link

What am i doing wrong??

like image 925
Praful Jangid Avatar asked Jan 20 '15 13:01

Praful Jangid


3 Answers

Have you modified Web.config as requested in post installation steps?

  1. Add the following nodes to the Web.config:
    • for IIS 6.x under the configuration\system.web\httpHandlers node
    • for IIS 7.x and up under the configuration\system.webServer\handlers node

If you did then do you use both WFFM and WeBlog module?

The problem is that WeBlog uses preprocessRequest sitecore pipeline to resolve CaptchaImage. This pipeline does not have Session prepared so WFFM captcha (which stores data in session by default) will not work in such a setup.

The solution was just to remove the

<preprocessRequest>
  <processor patch:before="*[1]" type="Sitecore.Modules.WeBlog.Pipelines.CaptchaProcessor,Sitecore.Modules.WeBlog"/>
</preprocessRequest>

from the WeBlog.config file.

like image 190
Krzysztof Chmiel Avatar answered Nov 04 '22 14:11

Krzysztof Chmiel


Found this article by Jonathan Robbins Web Forms for Marketers Captcha not displaying that solved my problem

It turns out there are additional configuration that need to be added to the web.config when installing or updating this version of Web Forms.

If your site is running on II7 and has Management Pipeline Mode is set to Integrated you will want to add theses configuration nodes at the bottom of the following location in the web.config configuration/system.webServer/handers

<add name="CaptchaImage" verb="*" path="CaptchaImage.axd" type="Sitecore.Form.Core.Pipeline.RequestProcessor.CaptchaResolver, Sitecore.Forms.Core" />
<add name="CaptchaAudio" verb="*" path="CaptchaAudio.axd" type="Sitecore.Form.Core.Pipeline.RequestProcessor.CaptchaResolver, Sitecore.Forms.Core" />

If your site is running on IIS6 or the Managed Pipeline of your Application Pool is Classic these two nodes needs to be added to the following path in the web.config configuration/system.webServer/httpHanders

<add name="CaptchaImage" verb="*" path="CaptchaImage.axd" type="Sitecore.Form.Core.Pipeline.RequestProcessor.CaptchaResolver, Sitecore.Forms.Core" />
<add name="CaptchaAudio" verb="*" path="CaptchaAudio.axd" type="Sitecore.Form.Core.Pipeline.RequestProcessor.CaptchaResolver, Sitecore.Forms.Core" />
like image 3
Aaron Avatar answered Nov 04 '22 14:11

Aaron


Thanks for your suggestions, but the problem were with dll conflict. When I first installed the WFFM module (which contains Captcha dll) and then after installing the WeBlog module (which also contains Captcha dll), the dll were over written. So trying with assembly redirect resolved this issue. Thanks again for your contribution.

like image 2
Praful Jangid Avatar answered Nov 04 '22 13:11

Praful Jangid