Hi, I have enabled "Send by email" in the Printer, email, and PDF versions module, and then I went to the form as a trusted user, clicked "Add a CAPTCHA", selected image CAPTCHA, and went back to the CAPTCHA admin page and saw it has added a new entry: print_mail_form. So far so good, but untrusted users never see a CAPTCHA on that form. They DO see one, on other forms, for example, comment entries.

Any thoughts anyone?

Thanks, Ron.

Comments

soxofaan’s picture

Does CAPTCHA 6.x-2.x work?
Are you using a CAPTCHA description (setting on CAPTCHA admin page)?

if you look at the HTML markup of the form, is there a <form id="print-mail-form" ...> in both cases (as admin and as untrusted user)?

soxofaan’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

I can't reproduce this problem

I tried with both CAPTCHA 6.x-1.x-dev and 6.x-2.x-dev and both worked as expected

rhouse’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Thanks soxofaan,

Now I can't reproduce it either! All I have done is try again today, having changed nothing, and I see a CAPTCHA. Don't you hate intermittent bugs?

Anyway, thanks heaps for replying.

Ron.

Drunoober’s picture

Status: Closed (fixed) » Needs work

On my Drupal 6.22 site I have the following modules

http://drupal.org/project/print (6.x-1.14)

http://drupal.org/project/captcha (6.x-2.4)

The captcha works on all my forms except for the Send page by Email form created by the Printer, e-mail and PDF versions module

when I try to add the form id to the list (id="print-mail-form") I get Illegal form_id

my setup
Apache 2.2
php 5.2.17

soxofaan’s picture

when I try to add the form id to the list (id="print-mail-form") I get Illegal form_id

"print-mail-form" is the HTML-markup id of the form, what you need to enter in the list is the "Drupal form id", which is never with dashes but with underscores, so it should be "print_mail_form" in your case.
Also note that you can also find this in the HTML markup: search for a hidden input field with name "form_id".

Drunoober’s picture

Thanks for the response Stefaan,
I figured out where the problem resides... meaning I think that the issue actually is related to the way things are cached in Drupal 6/Database... this is why I believe it to be true: The captcha still did not show even if I made the needed changes. So i disabled and uninstalled the "Send by email" part of the Printer, e-mail and PDF versions module and then re-installed it, this action made it finally work.

I am a novice in the internal workings of Drupal so I can't know for sure why this happens but knowing how i fixed it might help.

once again your help has been appreciated and your module is the best :)

Ps. I am sure you have been asked a million times so forgive me.... but i was wondering if you plan to add a captcha image reload functionality in case people can't read the the first captcha image?

soxofaan’s picture

Status: Needs work » Fixed

Indeed, if you have Drupal page cache enabled and you add CAPTCHA's, they wont show up because the pages are already cached without the CAPTCHA's.
You have to flush the page cache to fix this.
This can be achieved, for example, by going to Administer > Site configuration > Performance and disabling page cache and enabling it again.

about the image reloading: see #654118: Link for reloading CAPTCHA image

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.