Captcha image missing

Jose Zamorano asked on April 15, 2016 08:43

Hi There,

I just created a simple form that I am testing and the captcha image that should go in the form is missing. I investigated the process and in the control SimpleCaptcha.ascx.cs there is a method called

WindowHelper.Add("CaptchaImageText" + ClientID, GenerateRandomCode());

inside the method GenerateNew() (which generates a new code) that adds the captcha, to a session object or list from where is retrieved when the form builder is called.

Then I checked the control CaptchaImage.aspx.cs and there is a method called

WindowHelper.GetItem("CaptchaImageText" + captcha) that is returning null, so the actual jpeg captcha image cannot be generated.

My question: Is it possible to see where the random captcha number is stored so I can make sure that the captcha is being kept as supposed? This is a default functionality so I guess I am clear enough explaining the issue. if more clarification needed please let me know.

Thank you very much for your help!

Correct Answer

Brenden Kehren answered on April 15, 2016 14:16

Before inspecting the out of the box code for defects, I'd check to see if you have any browser errors with maybe some conflicting javascript or issues like that. Do you have the form in an update panel? This also causes some unexpected issues. Also do you have your form setup properly? A simple captcha field should be a text field with at least 5 characters in length.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Jose Zamorano answered on April 18, 2016 03:45

Hi Brenden,

Thank you very much for your suggestions. The forms are setup properly, all of them work fine when there is no captcha inserted and there is no javascript conflict either. As you say, the captcha field is made of a random 6 digit number that is stored somewhere and when the actual form is called kentico creates an image with those numbers and display it. In order to find out whether the actual values are stored or not I just need to know how to see that storage/list so I can identify why the captcha is not working. I tested the other forms and I created new forms without captcha and all work perfectly, same with javascript. I am narrowing down the issue to the point of investigating the storage process. If you can point me in the right direction that will be greatly appreciated.

Thanks in avance!

0 votesVote for this answer Mark as a Correct answer

Jose Zamorano answered on May 3, 2016 02:47

Hi there.

After investigating and not finding any other clues, we re-built and re-deployed the full website. That fixed the issue. Apparently some strange javascript problem but we couldn't find what caused the issue.

Now the captchas work as expected out of the box.

Thanks for your help!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.