Sitecore Webforms for Marketers – Captcha Not Rendering Correctly

Webforms for Marketers Captcha not displaying

I recently developed a custom Web Forms field to allow users to upload photos taken on their mobile device via Web Form for Marketers. The client is pretty high-profile so a part of the requirement that they have some form of protection of repeat uploads from exhibitionists in their community shall we say. Easy, the Captcha field will meet this requirement, however there is an infuriating issue where the captcha image doesn’t display.

It appears to affect most recent versions of Webforms for Marketers (WFFM) about 2.4 and above but may affect earlier versions. Essentially the field displays this with nothing helpful in the logs.

Captcha not displaying

The solution

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" />

Once implemented the Captcha field should load correctly and display as below.

Captcha displaying

And that’s it!

No more content editors seeing repeat uploads of body parts. Lovely.

Advertisements

6 thoughts on “Sitecore Webforms for Marketers – Captcha Not Rendering Correctly

  1. Hi,

    we are having the same issue as you described, but not 100% of the time. We added those 2 lines but it didn’t help.
    After some investigation I found out that the issue is caused by our multi-server environment. When I turned off the IIS on all CD servers except 1, the captcha started displaying correctly all the time.

    If you know anything regarding using the captcha on multi-server environment, that would be great.

    Thank you and have a nice day! 🙂

    Paula

    Like

    • Hi Paula,

      WFFM has two packages you need to install. One for the CM and one for all Cd servers. To me, it sound like the CD package has only been installed on one of the CD servers when it needs to be installed on all.

      I recommend unzipping the CD package and confirming the all code files are on each of the CD servers.

      Hope that helps

      Many thanks,
      Jonathan

      Like

      • Hi Jonathan,

        thanks for the quick response! 🙂

        Regarding the CD servers – we use Azure Module for deployments of all files from the CM to the CD servers, so the CD servers are all identical.

        After all we decided to use different approach for captcha, so we don’t have to investigate this issue anymore.
        Sorry for wasting your time 😦

        Have a nice weekend!

        Paula

        Like

  2. Hi ,

    Based on the given suggesition i have added the two nodes in the web.config file and i could see the Captcha.

    But when i click on the refresh / audio image the total web page is getting refreshed.

    Please suggest me

    Thanks
    Ravi

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s