Errors: Warning: Multiple links found for relationship...

I’m getting the following errors, which are only somewhat related, but are likely represented by the same issue.

Fri Jan 6 11:05:49 2017 [29707][88d72fdb-0515-d8d9-ff3a-53fe7a4010df][ERROR] Warning: Multiple links found for relationship pr_pricing_contacts within module PR_Pricing
Fri Jan 6 11:05:49 2017 [29707][88d72fdb-0515-d8d9-ff3a-53fe7a4010df][ERROR] Warning: Multiple links found for relationship pr_pricing_contacts within module Contacts
Fri Jan 6 11:05:49 2017 [29707][88d72fdb-0515-d8d9-ff3a-53fe7a4010df][ERROR] Warning: Multiple links found for relationship project_contacts_2 within module Project
Fri Jan 6 11:05:49 2017 [29707][88d72fdb-0515-d8d9-ff3a-53fe7a4010df][ERROR] Warning: Multiple links found for relationship project_contacts_2 within module Contacts

PR_Pricing, as the name implies, is a custom module, I don’t think it has been edited outside of the module builder. I don’t remember for certain.

For projects_contacts_2, this is a one_to_one relationship I added recently through studio.

Through searching the forum, I’m thinking this is probably an issue with vardefs.php or vardefs.ext.php, but I’m not seeing the issue.

// created: 2017-01-04 10:29:07
$dictionary["Project"]["fields"]["project_contacts_2"] = array (
  'name' => 'project_contacts_2',
  'type' => 'link',
  'relationship' => 'project_contacts_2',
  'source' => 'non-db',
  'module' => 'Contacts',
  'bean_name' => 'Contact',
  'vname' => 'LBL_PROJECT_CONTACTS_2_FROM_CONTACTS_TITLE',
  'id_name' => 'project_contacts_2contacts_idb',
);
$dictionary["Project"]["fields"]["project_contacts_2_name"] = array (
  'name' => 'project_contacts_2_name',
  'type' => 'relate',
  'source' => 'non-db',
  'vname' => 'LBL_PROJECT_CONTACTS_2_FROM_CONTACTS_TITLE',
  'save' => true,
  'id_name' => 'project_contacts_2contacts_idb',
  'link' => 'project_contacts_2',
  'table' => 'contacts',
  'module' => 'Contacts',
  'rname' => 'name',
  'db_concat_fields' => 
  array (
    0 => 'first_name',
    1 => 'last_name',
  ),
);
$dictionary["Project"]["fields"]["project_contacts_2contacts_idb"] = array (
  'name' => 'project_contacts_2contacts_idb',
  'type' => 'link',
  'relationship' => 'project_contacts_2',
  'source' => 'non-db',
  'reportable' => false,
  'side' => 'left',
  'vname' => 'LBL_PROJECT_CONTACTS_2_FROM_CONTACTS_TITLE',
);
// created: 2017-01-04 10:29:07
$dictionary["Contact"]["fields"]["project_contacts_2"] = array (
  'name' => 'project_contacts_2',
  'type' => 'link',
  'relationship' => 'project_contacts_2',
  'source' => 'non-db',
  'module' => 'Project',
  'bean_name' => 'Project',
  'vname' => 'LBL_PROJECT_CONTACTS_2_FROM_PROJECT_TITLE',
  'id_name' => 'project_contacts_2project_ida',
);
$dictionary["Contact"]["fields"]["project_contacts_2_name"] = array (
  'name' => 'project_contacts_2_name',
  'type' => 'relate',
  'source' => 'non-db',
  'vname' => 'LBL_PROJECT_CONTACTS_2_FROM_PROJECT_TITLE',
  'save' => true,
  'id_name' => 'project_contacts_2project_ida',
  'link' => 'project_contacts_2',
  'table' => 'project',
  'module' => 'Project',
  'rname' => 'name',
);
$dictionary["Contact"]["fields"]["project_contacts_2project_ida"] = array (
  'name' => 'project_contacts_2project_ida',
  'type' => 'link',
  'relationship' => 'project_contacts_2',
  'source' => 'non-db',
  'reportable' => false,
  'side' => 'left',
  'vname' => 'LBL_PROJECT_CONTACTS_2_FROM_PROJECT_TITLE',
);

I also have the same “issue” after creating a one-to-one relationship through studio with a custom module and AOS_Invoices. The relationship works fine but it’s rather annoying having that “error” pollute the log file.

What is also weird is the string “Warning: Multiple links found for relationship” comes from the file “data/Relationships/M2MRelationship.php”. M2M should be used for many-to-many relationships and not one-one. Doing more digging…

Did you come up with any solutions to this as we are having similar errors.

I did not investigate this further. Since it doesn’t seem to be hurting anything, I haven’t made it a priority. I would love to have it fixed, however, if you find the solution!

sieberta

Same here. I couldn’t be bothered to spend more time looking into it. Having used the product for many years, I’ve come to accept a lot of the weird behavior and move on if it works.