CRM-9953 Editing Option Group "Contact edit options" breaks the Contact editing form (phone, email, etc. part)

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.2.0
    • Component/s: None
    • Labels:
      None

      Description

      When an option e.g. "email" of option group 'contact edit options' is updated (I changed the label from 'Email' to 'Adresse électronique'), the filter column in table "civicrm_option_value" is set to "0" instead of "1". This causes then the following fatal error when editing a contact:

      PHP Fatal error: Call to undefined method CRM_Contact_Fo
      rm_Edit_Email::setDefaultValues() in /var/www/drupal-7.12-beta/sites/all/modules
      /civicrm/CRM/Contact/Form/Contact.php(361) : eval()'d code on line 1

      See in the attachment the related extract from table 'civicrm_option_value' BEFORE and AFTER update to option 'Email' of option group 'contact_edit_option'.

        Attachments

        1. CRM-9953.diff
          0.8 kB
          Jon K Goldberg
        2. edit_options
          7 kB
          Philippe Bégou

          Activity

          [CRM-9953] Editing Option Group "Contact edit options" breaks the Contact editing form (phone, email, etc. part)
          Jon K Goldberg added a comment -

          Patch attached. The filter field wasn't being loaded by the buildQuickForm method, so it was being saved with a default value of 0. I'm not sure that this is the best approach to fixing this problem, so I'd love feedback!

            People

            • Assignee:
              Jon K Goldberg
              Reporter:
              Philippe Bégou

              Dates

              • Created:
                Updated:
                Resolved: