Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-1637

User registration form is attempting to submit on first view

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.6
    • Fix Version/s: None
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      The standard Drupal /user/register form is showing validation errors due to blank fields even though the submit button has not been clicked.
      Tracing through the code does indeed confirm that a submit is being attempted. Turning off CiviCRM module fixes this behavior.

      I was also able to fix the behavior by editing civicrm.module:

      case 'register':
      $config =& CRM_Core_Config::singleton( );
      if ( empty( $_POST ) || $config->userFrameworkVersion < 4.7 )

      { return civicrm_register_data($edit, $user, $category, true, false ); }

      else

      { return civicrm_register_data( $edit, $user, $category, false, true ); }
      return;

      to read:
      case 'register':
      $config =& CRM_Core_Config::singleton( );
      if ( empty( $_POST ) || $config->userFrameworkVersion < 4.7 ) { return civicrm_register_data($edit, $user, $category, false, false ); } else { return civicrm_register_data( $edit, $user, $category, false, true ); }

      return;

      ...but I suspect this breaks other things, so I won't bother writing this up as a patch. Hopefully it helps clarify which conditions this occurs on though.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              grugnog Owen Barton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: