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.
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.
And that’s it!
No more content editors seeing repeat uploads of body parts. Lovely.
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
LikeLike
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
LikeLike
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
LikeLike
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
LikeLike
No need to add those 2 lines under both nodes if your IIS 6.x add under the configuration\system.web\httpHandlers node , otherwise, for IIS 7.x and up under the configuration\system.webServer\handlers node.
LikeLike
Thanks for the added info! I’ll update the post shortly
LikeLike