The problem:
If you set the site into "developer mode", you can't switch to the audio captcha when you click on "Verify using audio".
How to reproduce
1. Set up a vanilla drupal set and install & enable the mollom module
2. Don't set any keys but set the set the module into "developer mode"
3. Add the comment form for "article" and set the permission for anon to add comments
4. Add an article
5. Try to comment as anon on the article with "unsure" in the comment body
6. The CAPTCHA should be triggered. Now click on the "verify with audio captcha" link
7. Notice how nothing happens
The cause
When you open up your javascript console (Chrome), You'll see that the URL for the AJAX call will return a 403 access forbidden. In mollom_menu() the _mollom_access() function is called to do a few basic checks: The existence of the public and private keys in the configuration settings is checked, but because we are running in developer mode without actually configuring a Mollom account, variable_get('mollom_public_key', '') and variable_get('mollom_private_key', '') will return empty/false.
If you go check the keys in the settings panels, you'll see that a set of test keys has been generated in the keys form. Yet, these aren't actually saved to the database to prevent accidentally overwriting production keys.
Comment | File | Size | Author |
---|---|---|---|
#1 | mollom.captcha-audio-testing.1.patch | 1.14 KB | sun |
Comments
Comment #1
sunNice find! :) Attached patch fixes this issue by converting the last direct variable_get()s for API key retrieval.
Considered to write a test for this, but it's a bit pointless, since the tests are only testing the testing mode in the first place.
Comment #2
sunThanks for reporting, reviewing, and testing! Committed to all 2.x branches.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.