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

Removing HOLD on an email address throws fatal DB error

    Details

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

      Description

      To recreate, edit a contact record and check the "Hold" checkbox and save.
      Then edit same contact and uncheck "Hold" - you'll see this fatal error:

      --------------
      Database Error Code: Incorrect datetime value: '2010' for column 'hold_date' at row 1, 1292

      UPDATE civicrm_email SET contact_id = 105 , location_type_id = 1 , email = 'scout@foobar.org' , is_primary = 0 , is_billing = 0 , on_hold = 1 , is_bulkmail = 0 , hold_date = 2010 WHERE ( civicrm_email.id = 95 ) [nativecode=1292 ** Incorrect datetime value: '2010' for column 'hold_date' at row 1]
      -------------

      NOTE: Not sure why the query is updating on_hold = 1, since I've actually UNCHECKED the Hold checkbox. Query is definitely passing incomplete date string ('2010'). You may not see this error is your MySQL settings do not have sql mode = STRICT_TRANS_TABLES.

        Attachments

          Activity

            People

            • Assignee:
              rajan Rajan P Mayekar
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: