When I go to create
content, CRM Contact > fill out the form and then hit submit, I get the error below. It looks like the mysql query is missing a lot of AS statements before the joins.
Sorry. A non-recoverable error has occurred.
Database Error Code: Unknown table 'civicrm_contact' in where clause,
1109
Return to CiviCRM menu.
error
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => SELECT
civicrm_group_contact.id as civicrm_group_contact_id,
civicrm_group.title as group_title,
civicrm_group.visibility as visibility,
civicrm_group_contact.status as status,
civicrm_group.id as group_id,
civicrm_subscription_history.date as date,
civicrm_subscription_history.method as method FROM
civicrm_contact contact_a LEFT JOIN civicrm_group_contact ON contact_a.id =
civicrm_group_contact.contact_id LEFT JOIN civicrm_group ON
civicrm_group.id = civicrm_group_contact.group_id LEFT JOIN
civicrm_subscription_history
ON civicrm_group_contact.contact_id =
civicrm_subscription_history.contact_id
AND civicrm_group_contact.group_id =
civicrm_subscription_history.group_id WHERE civicrm_contact.id = 2 AND
civicrm_group.is_active = '1' AND civicrm_group_contact.status = "Added"
ORDER BY civicrm_group.title [nativecode=1109 ** Unknown table
'civicrm_contact' in where clause]
[type] => DB_Error
[user_info] => SELECT
civicrm_group_contact.id as civicrm_group_contact_id,
civicrm_group.title as group_title,
civicrm_group.visibility as visibility,
civicrm_group_contact.status as status,
civicrm_group.id as group_id,
civicrm_subscription_history.date as date,
civicrm_subscription_history.method as method FROM
civicrm_contact contact_a LEFT JOIN civicrm_group_contact ON contact_a.id =
civicrm_group_contact.contact_id LEFT JOIN civicrm_group ON
civicrm_group.id = civicrm_group_contact.group_id LEFT JOIN
civicrm_subscription_history
ON civicrm_group_contact.contact_id =
civicrm_subscription_history.contact_id
AND civicrm_group_contact.group_id =
civicrm_subscription_history.group_id WHERE civicrm_contact.id = 2 AND
civicrm_group.is_active = '1' AND civicrm_group_contact.status = "Added"
ORDER BY civicrm_group.title [nativecode=1109 ** Unknown table
'civicrm_contact' in where clause]
[to_string] => [db_error: message="DB Error: unknown error" code=-1
mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT
civicrm_group_contact.id as civicrm_group_contact_id,
civicrm_group.title as group_title,
civicrm_group.visibility as visibility,
civicrm_group_contact.status as status,
civicrm_group.id as group_id,
civicrm_subscription_history.date as date,
civicrm_subscription_history.method as method FROM
civicrm_contact contact_a LEFT JOIN civicrm_group_contact ON contact_a.id =
civicrm_group_contact.contact_id LEFT JOIN civicrm_group ON
civicrm_group.id = civicrm_group_contact.group_id LEFT JOIN
civicrm_subscription_history
ON civicrm_group_contact.contact_id =
civicrm_subscription_history.contact_id
AND civicrm_group_contact.group_id =
civicrm_subscription_history.group_id WHERE civicrm_contact.id = 2 AND
civicrm_group.is_active = '1' AND civicrm_group_contact.status = "Added"
ORDER BY civicrm_group.title [nativecode=1109 ** Unknown table
'civicrm_contact' in where clause]"]
)
Comments
Comment #1
seanberto commentedI was this error when I try click the "edit" tab after creating the crm node. If I click "edit civicrm contact" at the bottom of the node view page, I get an unrecoverable error:
"is not of the type Positive"
What version of civicrm are you using - and which Drupal? Do you have civicrm in the same db as your drupal tables?
I'm running 4.7.5 with civicrm 1.6.8284. I have civicrm in a separate db.
-s
Comment #2
Torenware commentedEmily,
I'm guessing that the new version of CiviNode for 4.7 will fix this. If it doesn't, post and tell me, and I'll debug on the new version.
Thanks,
Rob
---------------------
Date: Sun, 28 Jan 2007 15:19:58 -0800
From: Rob Thorne
To: civicrm-dev@lists.civicrm.org
Cc: emily.e.frazier@gmail.com, vijaiprao@gmail.com
Subject: [civicrm-dev] Test version of CiviNode for Drupal 4.7 and CiviCRM 1.6
I've just done a quick backport of CiviNode to Drupal 4.7. You can find
it at:
http://www.torenware.com/downloads/civinode-4.7-1.2-dev-1.tar.gz
As I said in a previous message, you can get the Drupal 5.0 version at:
http://www.torenware.com/downloads/civinode-5.x-1.x-devtest.tar.gz
Here's what new:
* Good CCK support. You can display a profile of a contact, group,
and some other data types as content in a CCK page.
* Autocomplete support for selecting contacts in Drupal forms. This
is built into the CCK support, or if you're a module writer, you
can easily add contact autocompletion into your own forms.
* Selection widgets for forms (for CCK and for module developers).
You can get a pop-up of contacts that belong to a specific group
(say, an "Organizers" group), or a group selector widget. There
is some support for other data types (Activities, Relationships)
as well.
* For module developers: an API to make common CiviCRM tasks a bit
easier, such as getting the groups that a given UID belongs to,
theming contact display, and more.
For both the 5.0 and 4.7 releases, I've removed a lot of experimental
code, or code that required patching other modules (most notably,
Organic Groups). In particular, the "contact nodifying", access control
and Organic Groups support are gone (although some of the API stuff can
still be found in civinode_utils.inc for those inclined to such things).
If you're having a problem with CiviNode under 4.7, please download
this version and try it out. I'd like to make sure I've resolved as
many of your issues as possible. I still haven't sussed out new CVS
set-up on Drupal.org, but once I've gotten a bit more feedback on these
builds, I'll release them on Drupal.org.
Thanks much,
Rob Thorne
Torenware Networks
____________________________________________________________
You received this message as a subscriber on the list:
civicrm-dev@lists.civicrm.org
To be removed from the list, send any message to:
civicrm-dev-unsubscribe@lists.civicrm.org
For all list information and functions, see:
http://lists.civicrm.org/lists/info/civicrm-dev
Comment #3
Torenware commentedNew versions for 4.7 and 5.x resolve this.