I am getting the following error when attempting to visit a node of type including a CCK civinode field:

Sorry. A non-recoverable error has occurred.

is not of the type Integer

Return to home page.

(Note: there is nothing before the words "is not of the type Integer on line 2. Nothing is logged to watchdog.)

This seems to be a CiviCRM error, judging by the yellow box in which it appears.

Background: recent upgrade Drupal 4.7 ->5.7 and CiviCRM 1.6->1.7->1.8 (unable to upgrade to 1.9 because host does not yet support PHP5). CiviNode 5.x-1.2; activated modules CiviNode, then CiviCRM CCK Widgets but not CiviCRM Data. Drupal and CiviCRM both working normally before and after upgrade but with no links between them. Drupal has about 3,000 nodes and CiviCRM has about 4,000 contacts including about 250 member organizations.

Objective: reduce "multiple versions of the truth" by providing some of the contact data about member organizations from CiviCRM into nodes in Drupal, where currently we re-enter the data for public display. This is always going out of sync! ...besides being bad practice.

History of the problem; set up new content type (node type) "test2" with default Title and Body fields. Added field "civinode data" of type "CiviCRM Contact", weight 0, no group, Contact Autocompletor; Data settings use existing, working CiviCRM default group and profile. Then create content, type test2, input title and body, input partial name of an existing CiviCRM contact, select from the list (note: the names that pop up are duplicated, but I can live with that).

Error above occurs on submitting, previewing or attempting to view the node thus created.

Tried to find a way to do mirroring, but the release notes seem to indicate that maybe this code has been taken out for version 5.x. Node type civinode_contact is not present, but maybe http://www.torenware.com/node/91 is out of date?

Finally, set up a view with filter set to type test2 only and including the "civinode data" field set up above. If view type is set to full nodes or teaser list, I get the same error as above. If set to table view, I see the title of the new node in the list, but nothing in the civinode data column.

Not sure whether this will help, but with CiviCRM debugging and backtrace switched on, I get the following additional information:

backTrace

/home/httpd/vhosts/example.org/httpdocs/modules/civicrm/CRM/Core/Error.php, backtrace, 258
/home/httpd/vhosts/example.org/httpdocs/modules/civicrm/CRM/Utils/Type.php, fatal, 262
/home/httpd/vhosts/example.org/httpdocs/modules/civicrm/CRM/Core/DAO.php, validate, 704
/home/httpd/vhosts/example.org/httpdocs/modules/civicrm/CRM/Core/DAO.php, composequery, 669
/home/httpd/vhosts/example.org/httpdocs/modules/civicrm/CRM/Core/BAO/UFGroup.php, executequery, 256
/home/httpd/vhosts/example.org/httpdocs/modules/civicrm/api/UFGroup.php, getfields, 101
/home/httpd/vhosts/example.org/httpdocs/modules/civinode/civinode_utils.inc, crm_uf_get_profile_fields, 460
/home/httpd/vhosts/example.org/httpdocs/modules/civinode/civinode.module, civinode_get_profile_metadata, 294
, theme_crm_profile_cid, 
/home/httpd/vhosts/example.org/httpdocs/includes/theme.inc, call_user_func_array, 170
/home/httpd/vhosts/example.org/httpdocs/modules/civinode/civinode_cck.module, theme, 488
, theme_civinode_cck_profiled_contact, 
/home/httpd/vhosts/example.org/httpdocs/includes/theme.inc, call_user_func_array, 170
/home/httpd/vhosts/example.org/httpdocs/modules/civinode/civinode_cck.module, theme, 445
, civinode_cck_field_formatter, 
/home/httpd/vhosts/example.org/httpdocs/includes/module.inc, call_user_func_array, 386
/home/httpd/vhosts/example.org/httpdocs/modules/cck/content.module, module_invoke, 948
/home/httpd/vhosts/example.org/httpdocs/modules/cck/content.module, content_format, 587
/home/httpd/vhosts/example.org/httpdocs/modules/cck/content.module, _content_field_view, 275
/home/httpd/vhosts/example.org/httpdocs/modules/cck/content.module, content_view, 315
/home/httpd/vhosts/example.org/httpdocs/modules/node/node.module, content_nodeapi, 479
/home/httpd/vhosts/example.org/httpdocs/modules/node/node.module, node_invoke_nodeapi, 770
/home/httpd/vhosts/example.org/httpdocs/modules/node/node.module, node_build_content, 689
/home/httpd/vhosts/example.org/httpdocs/modules/node/node.module, node_view, 779
/home/httpd/vhosts/example.org/httpdocs/modules/node/node.module, node_show, 2470
, node_page_view, 
/home/httpd/vhosts/example.org/httpdocs/includes/menu.inc, call_user_func_array, 418
/home/httpd/vhosts/example.org/httpdocs/index.php, menu_execute_active_handler, 15

Sorry this is such a long post. Thanks.

Comments

syoumans’s picture

I was able to get around this problem by deleting the old civinode fields from my content type and then adding them back in with the same names (so my custom code would hopefully continue to work).

Having done this, however, I am seeing odd behavior when I have multiple civnode fields in a single content type, such as fields not loading stored values, or values being overwritten.

jsg’s picture

Thanks for the response. I deleted and re-created the civinode field in the test content type. I can now display a newly-created node, but only if I choose to set Teaser and Full to "Default" in Display fields. If I set them to "Contact profile", I get the "non-recoverable error" "is not of type Integer" as above (when I submit or try to view the node). The Default display is just the contact name from CiviCRM. (BTW, the autocompleter box takes a while to pop up, and when it does, it shows contact names duplicated or triplicated.)

So I'm still a bit lost as to how to get at the more detailed contact information in CiviCRM...? Any further help would be much appreciated.

Poieo’s picture

Setting up a new site and have discovered the same problem. Did you ever find a solution to this?

jsg’s picture

I downgraded to Civinode 5.x-1.1. Not sure what else, but that seems to be working. HTH.

sutharsan’s picture

Status: Active » Closed (duplicate)

Created my issue after finding this issue.
http://drupal.org/node/268492 most likely offers the solution for this problem.