Captcha has recently stopped working on a site of mine. I don't do all the management, so I'm not 100% sure what all has been done recently. I did notice that Drupal is now running 5.17. The site was using an older dev release of 3.x, so I upgraded to 3.2, but the problem persists. Captchas simply do not appear, and when I use the admin show link option, and then click it on the form, I see "Array" as the form id. Any ideas on what the problem could be (cache tables were emptied and update.php was run for Captcha)? Permissions have also been triple-checked, as has the settings for Captcha.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | captcha-array.jpg | 20.38 KB | davemybes |
Comments
Comment #1
soxofaan commentedI can't reproduce with Drupal 5.18 and CAPTCHA 5.x-3.2.
Can you show a screenshot or something of the CAPTCHA admin link problem and please include the URL (you can obfuscate the domain, I'm only interested in the drupal path)?
Could there be any conflict with another module that was added/updated along with the update to drupal 5.17?
Comment #2
davemybes commentedThis is the URL when I try to add a Captcha to the contact form using the admin link: /admin/user/captcha/captcha/captcha_point/Array?destination=contact. You can see the attached screenshot too.
Comment #3
davemybes commentedAlright, a local copy of the site allows Captcha to work properly - nothing was changed, just a straight copy and database export/import. So I guess this is a server issue on our side. I'll leave this issue open for now until I figure out the problem. I'll post the solution here and then close the issue.
Comment #4
soxofaan commentedThis is the line that generates the CAPTCHA admin link that doesn't work for you:
l(t('change'), "admin/user/captcha/captcha/captcha_point/$form_id", array(), drupal_get_destination())the variable $form_id comes straight from the function call
captcha_form_alter($form_id, &$form)according to http://api.drupal.org/api/function/hook_form_alter/5 this should be a string, but apparently it is an array on your setup.
are you working with a hacked/custom patched version of Drupal core or something?
Or maybe you have a mix of Drupal 5 and Drupal 6 stuff, because the signature for hook_form_alter in Drupal 6 is
hook_form_alter(&$form, $form_state, $form_id)and the first argument $form is an array here.
Comment #5
soxofaan commentedClosing old/outdated issues for 5.x releases, which is officially unsupported now.
If this issue still exists for Drupal6 or Drupal7, please reopen (and update the version)