CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • "The CAPTCHA field is required." but nowhere to enter it!!!
Pages: [1] 2

Author Topic: "The CAPTCHA field is required." but nowhere to enter it!!!  (Read 18529 times)

frock

  • I’m new here
  • *
  • Posts: 6
  • Karma: -1
"The CAPTCHA field is required." but nowhere to enter it!!!
April 30, 2009, 03:16:44 am
help, i am going crazy. i have set up contribute pages that work fine when i am logged in as superuser, i have been able to go through & make test payments and actual payments. but when someone else - either an authenticated user or a new user, goes through the contribute process, confirms their information & hits the "processing" button - they get returned to the home page with the error message "The CAPTCHA field is required."

however there is nowhere on the contribute page to enter a CAPTCHA field. as far as i can work out it is not connected to the name&address profile that is used. we are using Mollom but from what i can understand of the settings there is nothing that i can turn off on the contribute pages, & i can't even find any settings for reCaptcha so i have no idea what that is about.

i am totally confused about whether the problem is in the settings for drupal or civicrm, whether it is in the contribute settings or in the user profile or something to do with authenticating users - because it is working fine for me as superuser. i just feel like i'm spending hours going round in circles & never getting any closer to the solution ...

 :'(

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
April 30, 2009, 10:44:41 pm

what version are you using

note that we use reCaptha and not CAPTCHA. So that warning message might be from another module?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

MiriamNZ

  • Guest
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
May 01, 2009, 02:04:06 am
This module is Mollom. Whether it is Mollom or CiviCRM that is causing the hiccup is the question.

jeff porter

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 2
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
January 20, 2010, 08:20:59 pm
This is mollom that is the problem.  It appears to be an issue with CiviCRM trying to register a USER via a profile that is configured to "Create Account".  If you go into Mollom config and disable checking on User Registration, it should work.

We just ran into this with personal campaign pages.

Jeff
Jeff Porter
Foundation for Prader-Willi Research (www.fpwr.org)

1green1

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
    • Resource Center Chicago
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
February 07, 2010, 09:34:43 am
It seems like it would be very helpful for Mollom and CiviCRM to play well together. Any chance of this?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
February 07, 2010, 01:13:43 pm

depends if someone in the community steps up and contributes a patch. wanna write the patch?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

1green1

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
    • Resource Center Chicago
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
February 18, 2010, 06:59:42 am
I'd love to, but I don't think I have the skills. I'll propose it to the Mollom/Acquia folks.

Thibaud Kistler

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 3.1.4
  • CMS version: Drupal 6.x
  • MySQL version: 5
  • PHP version: php 5
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
October 19, 2011, 03:45:37 pm
hello,

I can see here that there has been no post on this topic since a while, has this problem been fixed ? I am having right now and can't figure out how to make it work...


torrance123

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 3
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.0.91
  • PHP version: 5.3.3
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
February 20, 2012, 06:48:18 pm
We are having the same issue here.

If, whilst completing a civicrm contribution form, you create a new user account, then this step will fail if Mollom is protecting the user_register form. In our case, we get redirected to the front page with a warning "Word verification field is required."

Mollom is doing everything right by protecting the form using the usual form_alter hooks. The issue with with Civicrm.

Civi is injecting a username and password field into the contribution form. Then, to process it, civi is 'faking' a form submission by loading up the form, filling in the form state with the username and password, deleted any captcha field info that may exist, and then asking drupal to process the form as if it was submitted by the user directly. I guess this was to take advantage of Drupal validation and process functions, so as not to have to write this stuff again. However, since it is 'faked', and since drupal forms can change by way of the hook system, this process will fail if the user_registration form has modified requirements, as is the case with Mollom.

I think the solution is that Civi needs to take care of the form validation and processing itself (and this could simply mean using the Drupal functions directly, rather than using them via a fake form submission), and do away with the fake form submission.

The offending code is lines 501 - 554 of CRM/Core/BAO/CMSUser.php, the function createDrupalUser().
« Last Edit: February 20, 2012, 06:51:20 pm by torrance123 »

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
February 20, 2012, 07:39:54 pm
and looks like T is well on the way to a patch or at least a useful contribution - back tomorrow
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

torrance123

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 3
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.0.91
  • PHP version: 5.3.3
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
February 21, 2012, 06:38:38 pm
I've opened a bug on Jira and supplied patch. http://issues.civicrm.org/jira/browse/CRM-9711

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
May 04, 2012, 06:09:02 pm
We are encountering the same problem with Drupal 6/Civicrm 4.1.2  :'(

Any progress?

best,
Merlise

Merlise Clyde

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
May 07, 2012, 06:53:10 pm
This affects Civicrm version 4.1.2 under Drupal 6 as well.  the CreateDrupalUser function is no longer in CMSUser.php as in the patch, but related code is in CRM/Utils/System/Drupal6.php as createUser

I tried to modify the CreateUser function based on the Torrance's patch, but the result is that I am redirected to the homepage.  The  Mollum Word Verification error is gone however, but the transaction in civicrm event, membership, contribution etc (anything that use the profile with account creation required)  fails to complete leaving a pending transaction and no Drupal account created.

Current solution is to turn mollum off for the user registration form, but require that admin approve all account requests.
Merlise Clyde

hbergin

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 6
  • CiviCRM version: 3.4.5 to 4.4.1
  • CMS version: Drupal 6.28 to 7.23
  • MySQL version: 5.5.34
  • PHP version: 5.3.10
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
January 08, 2013, 09:05:26 pm
I hit the issue on D6 and Civi 4.2.7.

Coming at this from a different direction for D6, I've had luck with this drupal hook implementation approach. Not a long term CiviCRM solution, but may help someone as a quick interim solution. $_GET['q'] could be checked to see if it starts with 'civicrm', for example, for a more general application.
/**
 * Implements of hook_form_alter().
 * Suppress mollom user registration form validation,
 * if the page is not the user/register page (e.g. civicrm event registration).
 */
function mymodule_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {
    case 'user_register':
      if ($form['#validate'][2] == 'mollom_validate_captcha' &&
          $_GET['q'] == 'civicrm/event/register') {
        unset ($form['#validate'][2]);
      }
      break;
  }
}

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: "The CAPTCHA field is required." but nowhere to enter it!!!
January 10, 2013, 11:32:43 am
Hi Guys.  A general rule of thumb is "With CiviCRM, use reCaptcha, not Mollom".

The makers of contributed modules make no guarantees their modules will work with every other module out there.

Some of you may be married to Mollom and if that is the case and you have budget or skills to build a patch so that the modules Mollom and CiviCRM will work together, then you are welcome to submit that patch and maintain it.

If you are simply looking to prevent spam and want a zero-cost workaround, then look to the Captcha and ReCaptcha Drupal modules.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • "The CAPTCHA field is required." but nowhere to enter it!!!

This forum was archived on 2017-11-26.