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

Civicrm associated Drupal module weights too low

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.8, 4.1.0
    • Fix Version/s: 4.3.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Civicrm recently increased its Drupal module weighting to 100. However, the associated drupal modules (eg. civicrm_group_roles, civicrm_member_roles, civicrm_og_sync) all remain at 0.

      There are some egde cases where those associated modules will expect civicrm core to have already run, causing nasty and unhelpful error messages. One such case is logging into a site as a Drupal user who has an existing civicrm contact record but does not yet have a uf_match record. civicrm_group_roles will run with the expectation that this uf_match record already exists and will die mid-logging in, with this error message:

      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 296
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/sites/all/modules/civicrm/CRM/Utils/Type.php, fatal, 282
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/sites/all/modules/civicrm/CRM/Core/DAO.php, validate, 933
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/sites/all/modules/civicrm/CRM/Core/DAO.php, composeQuery, 870
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/sites/all/modules/civicrm/CRM/Contact/BAO/GroupContact.php, executeQuery, 405
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/sites/all/modules/civicrm/api/v2/GroupContact.php, getContactGroup, 66
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/sites/all/modules/civicrm/drupal/modules/civicrm_group_roles/civicrm_group_roles.module, civicrm_group_contact_get, 86
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/modules/user/user.module, civicrm_group_roles_user_login, 101
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/modules/user/user.module, user_module_invoke, 2225
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/modules/user/user.module, user_login_finalize, 2238
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/includes/form.inc, user_login_submit, 1430
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/includes/form.inc, form_execute_handlers, 844
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/includes/form.inc, drupal_process_form, 364
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/includes/form.inc, drupal_build_form, 123
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/sites/all/modules/logintoboggan/logintoboggan.module, drupal_get_form, 886
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/sites/all/modules/logintoboggan/logintoboggan.module, logintoboggan_unified_login_form, 918
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/sites/all/modules/logintoboggan/logintoboggan.module, logintoboggan_get_authentication_form, 755
      , logintoboggan_unified_login_page,
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/includes/menu.inc, call_user_func_array, 503
      /var/www/australianbreastfeeding/www.breastfeeding.asn.au/index.php, menu_execute_active_handler, 21
      Sorry. A non-recoverable error has occurred.
      One of parameters (value: ) is not of the type Integer
      Return to home page.

      Increasing the module weighting of civicrm_group_roles to 101 fixed this (though I think, since modules also run in alphabetical order if they are of the same weight, that a weight of 100 would have been sufficient).

      The associated civicrm drupal modules need to have their weighting increased to run after civicrm itself.

        Attachments

          Activity

            People

            • Assignee:
              pratik.joshi Pratik Joshi
              Reporter:
              torrance123 Torrance
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: