Getting a PDOException error. The same as reported in #4 here Undefined index: en-US in corresponding_node_references_update() but this site is not multilingual.

It occurs:

  • at admin/config/system/corresponding_node_references
  • check the box for field instances
  • click Save
  • Error:
    PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'PRIMARY': INSERT INTO {corresponding_node_references} (node_types_content_fields, enabled) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => 1 ) in drupal_write_record() (line 6859 of /Applications/MAMP/htdocs/d7/includes/common.inc).
CommentFileSizeAuthor
#1 Capture.PNG13.41 KBadam_b
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adam_b’s picture

FileSize
13.41 KB

Same for me :(

czigor’s picture

Do you have ctools enabled?

keva’s picture

yes - ctools 7.x-1.0-rc1

but none of its sub-modules

czigor’s picture

Can you please try disabling-enabling the module?

czigor’s picture

Status: Active » Fixed

I think I have found the bug. Try 7.x-4.22.

keva’s picture

7.x-4.22 works, and the error is gone.

However, adding a node with a reference results in this Notice:
Notice: Undefined offset: 2 in corresponding_node_references_processing_node() (line 134 of /Applications/MAMP/htdocs/d7/sites/all/modules/cnr/corresponding_node_references.module).

But it does work - the automatic references are built.

czigor’s picture

Go to the corresponding_node_references table in your database and remove all the lines that have an empty 'node_types_content_fields' field. That should solve the notice problem.

adam_b’s picture

Same response as #6 - error was fixed, but notice appeared. Applying the fix in #7 corrected this.
All looking great now - many thanks.

keva’s picture

works great now. Thanks very much!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.