The mollom captcha element never appears on form elements whose mode is set to 'captcha and analysis'. This is because:
- Mollom's 3 modes are 'none' (0), 'captcha only' (1), and 'captcha and analysis' (2);
mollom_expand_element()checks that$element['#mode'] == MOLLOM_MODE_CAPTCHA;- this check will never pass on 'captcha and analysis' mode, because 1 != 2
- however, since the modes (0, 1, 2) are all 2x values, we can do bitwise OR checking instead... so
1 | 2 == TRUE
Attached patch changes the EQUALS checking in mollom_expand_element() with bitwise OR checking. This results in the captcha element appearing on forms that are set to 'captcha and analysis' mode, as it should.
| Comment | File | Size | Author |
|---|---|---|---|
| mollom_mode.patch | 872 bytes | Jaza |
Comments
Comment #1
Josiv commentedHad this problem, patch works nice (manually aplied because i allready patched for guestbook usage and never 64 version), THX.
What a pity no activity in this area for so long time.
Comment #2
nielt commentedThere is no "analysis and CAPTCHA" mode. The mode referred to here is "analysis with a CAPTCHA backup". The whole point of the analysis mode is to not confront a user with a CAPTCHA upon first rendering the form. The CAPTCHA is only meant to appear if the text analysis returns the unsure state and the form is rendered again.