CRM-8948 Unable to link Drupal roles to CiviCRM membership type

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.5
    • Fix Version/s: 3.4.7
    • Labels:
      None

      Description

      I'm attempting to link the member role "Member" to the Civicrm role "member". When I click the submit button,

      PDOException: SQLSTATE[HY000]: General error: 1364 Field 'rule_id' doesn't have a default value: INSERT INTO

      {civicrm_member_roles_rules}

      (rid, type_id, status_codes) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 5 [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_2] => a:4:{i:0;s:7:"current";i:1;s:7:"expired";s:7:"current";a:3:

      {i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"3";}

      s:7:"expired";a:4:{i:0;s:1:"4";i:1;s:1:"5";i:2;s:1:"6";i:3;s:1:"7";}} ) in civicrm_member_roles_add_rule_form_submit() (line 454 of /var/www/ooga-crm/drupal/sites/all/modules/civicrm/drupal/modules/civicrm_member_roles/civicrm_member_roles.module)

        Attachments

          Activity

          [CRM-8948] Unable to link Drupal roles to CiviCRM membership type
          steven stern added a comment -

          I did a default Drupal install, so the correct table name should be main_civicrm_member_roles_rules. Also, this is version 4.0.6, not 4.0.5.

          Donald A. Lobo added a comment -


          can you apply the patch which will appear on the fisheye link above in the next few hours

          steven stern added a comment -

          The patches worked. Thanks!

          Shane Cory added a comment -

          Had this issue on 4.05, applied the patch with no luck. Upgraded to 4.0.8 and also no luck. Still get the same error:

          PDOException: SQLSTATE[HY000]: General error: 1364 Field 'rule_id' doesn't have a default value: INSERT INTO

          {civicrm_member_roles_rules}

          (rid, type_id, status_codes) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 4 [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_2] => a:4:{i:0;s:7:"current";i:1;s:7:"expired";s:7:"current";a:1:

          {i:0;s:1:"2";}

          s:7:"expired";a:1:{i:0;s:1:"4";}} ) in civicrm_member_roles_add_rule_form_submit() (line 454 of /var/www/vhosts/citizenoutreach.org/httpdocs/sites/all/modules/civicrm/drupal/modules/civicrm_member_roles/civicrm_member_roles.module).

          Cleared the template director and drupal caches without benefit. I'm sure this is the fix but I must be missing a step in what to do after uploading the patch (I ran update.php)

            People

            • Assignee:
              Donald A. Lobo
              Reporter:
              steven stern

              Dates

              • Created:
                Updated:
                Resolved: