After installing the module and turning on sync for one CiviCRM group, I attempted to add an individual to that group and got the attached error.

CommentFileSizeAuthor
CiviCRMCCerror2.jpg22.45 KBBweber-1

Comments

chiddicks’s picture

Here's more detail on that error, as I'm having the same problem:

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: syntax error

    Database Error Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM civicrm_value_constantcontact_1 WHERE entity_id=4 LIMIT 1' at line 2, 1064

    Return to home page.
Error Details:

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => 
  SELECT 
      FROM civicrm_value_constantcontact_1
      WHERE entity_id=4 LIMIT 1 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM civicrm_value_constantcontact_1
      WHERE entity_id=4 LIMIT 1' at line 2]
    [type] => DB_Error
    [user_info] => 
  SELECT 
      FROM civicrm_value_constantcontact_1
      WHERE entity_id=4 LIMIT 1 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM civicrm_value_constantcontact_1
      WHERE entity_id=4 LIMIT 1' at line 2]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="
  SELECT 
      FROM civicrm_value_constantcontact_1
      WHERE entity_id=4 LIMIT 1 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM civicrm_value_constantcontact_1
      WHERE entity_id=4 LIMIT 1' at line 2]"]
)

What version of CiviCRM are you running?

Josher’s picture

Notice the above error one logged in, user home page. Running version CiviCRM 3.3.6.

chiddicks’s picture

Code typo: line 133 of civicrm_constant_contact.module - $line_feild; correct to $line_field and problem goes away.

Bweber-1’s picture

Status: Active » Fixed

Glad to hear that the issue root cause was identified. I am confused about the status of this being set as fixed. Does that mean it will be fixed in a future release?

chiddicks’s picture

Well, the source of the issue has been found, and a fix has been posted and tested. Normally I would also put up a patch, but I figured it's simpler for folks to just make the change to the code directly. It's up to the maintainers to decide if they want to include this fix in future releases (one would hope so).

Bweber-1’s picture

Status: Fixed » Reviewed & tested by the community

I have also made the change in the module php and the problem goes away for me too!! Thank you.

If a new user of the module downloads the most current version, they will run into the error. I think it would be appropriate to set this to reviewed and tested, but not yet fixed so that others will at least look for a fix someplace.

bigjim’s picture

Status: Reviewed & tested by the community » Closed (fixed)

it's fixed in a patch applied to Issue #1104938