CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviCRM Mailings - Joomla - No contactID clause error
Pages: [1]

Author Topic: CiviCRM Mailings - Joomla - No contactID clause error  (Read 1581 times)

TechWild

  • Guest
CiviCRM Mailings - Joomla - No contactID clause error
June 11, 2010, 09:49:15 am
Mailing (Draft and Unscheduled Mailings)
1st screen. Filled in "name of mailing", included a group (a smart group), hit "next"
2nd screen. Yellow error box saying: "No contactID clause" (attaching error screen)

Using
Joomla 1.5.18
CiviCRM 3.1.4

Any thoughts?
Thanks.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: CiviCRM Mailings - Joomla - No contactID clause error
June 11, 2010, 10:18:13 am
Does the user you use have a contact in civicrm ? (try going to your dashboard)

Been having random error messages like that when one of civicrm users thought it'd be a good idea to delete my contact...
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

TechWild

  • Guest
Re: CiviCRM Mailings - Joomla - No contactID clause error
June 11, 2010, 10:48:10 am
Thanks Xavier,
A different person created the mailing, so I checked, and that person’s Civi Contact was not linked to that persons Joomla user.
So I ran the “Synchronize Users to Contacts” to try and connect them.  I found two Civi Contacts for the person. I deleted the one that wan’t connected to a Joomla user.

I asked the person to log back into joomla, delete the “draft mailing”, and to try and create a new one.
She was still getting the error. So she tried to do a different mailing based on a different group, and it worked fine.

So something is wrong with the smart group that she was trying to send the mailing to.  I did a quick glance at the list of contacts for the failing smart group and some of the contacts are missing emails. Could that cause the error?

I believe that this person also originally created the smart group in question, so maybe her contact not being linked to a user, caused an issue when creating the smart group. Then when trying to mail to the smart group, caused the error.

Anyway, we should be good to go for now. If I find anything else out on why the group caused an error, I will post it.

jimmyjam

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
Re: CiviCRM Mailings - Joomla - No contactID clause error
December 13, 2010, 10:33:29 am
I am getting the same error when I attemp to send a mailing to 'All contacts'. I didn't have this problem prior to upgrading to CiviCRM 3.3.1. It's pretty frustrating.

Thanks,
James


bpayst

  • I’m new here
  • *
  • Posts: 16
  • Karma: 3
Re: CiviCRM Mailings - Joomla - No contactID clause error
December 16, 2010, 12:17:53 pm
Seeing the same behavior in 3.3.1 after the upgrade. The smart group shows contacts when you look at it from the manage groups view, but it can't be used in CiviMail without throwing that error.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviCRM Mailings - Joomla - No contactID clause error
December 16, 2010, 02:00:33 pm

hey bpayst and jimmyjam:

1. did techwild's solution work for you? what were the results? if not, might be better off starting a new thread.

2. what happens when u create a brand new similar smart group

3. did you try doing the same experiment on demo?

While we do understand that it can be frustrating to deal with these issue, civicrm is an open source product and we do rely on code contributions and improvements from users to improve the stability of the platform.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

iteratix

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
Re: CiviCRM Mailings - Joomla - No contactID clause error
December 17, 2010, 12:01:32 pm
Hi Lobo, others -- this issue is duplicatable on the Drupal Demo at CiviCRM.org.  We are seeing it on our Civi (3.3.0) w/Drupal.

Steps:

1.  Create a smart group that has no criteria (everyone in the db).
2.  Create a mailing, select the smart group, and click Next.
3.  "No ContactID clause error" right away

EDIT:  We're looking at why this may happen, but any help or insight is appreciated.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviCRM Mailings - Joomla - No contactID clause error
December 17, 2010, 01:41:33 pm
1. Filed an issue here: http://issues.civicrm.org/jira/browse/CRM-7240

2. can you try this patch

Code: [Select]
Index: CRM/Contact/BAO/SavedSearch.php
===================================================================
--- CRM/Contact/BAO/SavedSearch.php (revision 31323)
+++ CRM/Contact/BAO/SavedSearch.php (working copy)
@@ -182,7 +182,14 @@
                 return array( $from, $where );
             }
         } else {
-            CRM_Core_Error::fatal( 'No contactID clause' );
+            $from = "
+FROM      civicrm_contact contact_a
+LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1)
+";
+            $where = " ( 1 ) ";
+            $tables['civicrm_contact'] = $whereTables['civicrm_contact'] = 1;
+            $tables['civicrm_email'] = $whereTables['civicrm_email'] = 1;
+            return array( $from, $where );
         }
     }
« Last Edit: December 17, 2010, 06:32:24 pm by Donald Lobo »
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

iteratix

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
Re: CiviCRM Mailings - Joomla - No contactID clause error
December 17, 2010, 09:11:06 pm
Applied the patch and it doesn't report the error anymore.  Thank you, Lobo!  That seems to have taken care of it.

I will do further testing and send a mailing out soon.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviCRM Mailings - Joomla - No contactID clause error

This forum was archived on 2017-11-26.