When I enable the mollom module I get the error 'Cookies should be enabled in your browser for CAPTCHA validation.' every time.

I, also, had a user report that in IE he got the error 'invalid CAPTCHA token. The answer you entered for the CAPTCHA was not correct.' even when he entered the correct answer.

These errors only come up once the mollom module has been enabled.

CommentFileSizeAuthor
#4 241248_prerender_overwriting.patch1.01 KBsoxofaan

Comments

mfer’s picture

soxofaan’s picture

The Mollom module and CAPTCHA module are not supposed to work together for the moment.
I'll have to look into this.

You should not enable both Mollom and a CAPTCHA from the CAPTCHA module on the same form for now.
Is there any reason you do so?

mfer’s picture

This isn't just a matter of the same form. It could be just on the same site.

For example, I could have captcha running for my registration form and mollom for my comments. This won't work. As long as the mollom module is installed all captchas on the site stop working for me. It doesn't seem to relate to the forms they are on.

soxofaan’s picture

Status: Active » Fixed
StatusFileSize
new1.01 KB

the problem is caused by an overwriting bug of the #pre_render functions

around line 504 of captcha.module:

   $form['#pre_render'] = ((array) $form['#pre_render']) + array('captcha_pre_render', 'captcha_pre_render_place_captcha');

should be

    $form['#pre_render'][] = 'captcha_pre_render';
    $form['#pre_render'][] = 'captcha_pre_render_place_captcha';

fixed in CVS for 5.x-3.x (http://drupal.org/cvs?commit=108997 and http://drupal.org/cvs?commit=109001)

soxofaan’s picture

(just for the record: this issue does not occur in 6.x-1.x nor HEAD, so no porting is needed)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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