OK, I think Iâm finally on to something. In each instance where I get an error message for multiple links found for relationships, I see that in (/custom/Extension/modules/[moduleName]/Ext/Vardefs there is a php file that defines that relationship. On relationships that donât get that error, there is no such pdf file. I think this is a bug in Studio, where the relationship is double-defined. Iâm going to use a specific example, which is a relationship pr_pricing_contacts.
Example errors:
Fri Nov 16 11:17:02 2018 [12803][1][ERROR] Warning: Multiple links found for relationship pr_pricing_contacts within module PR_Pricing
Fri Nov 16 11:17:02 2018 [12803][1][ERROR] Warning: Multiple links found for relationship pr_pricing_contacts within module Contacts
In /custom/Extension/modules/Contacts/Ext/Vardefs there is a file with these contents (pr_pricing_contacts_Contacts.php):
<?php
// created: 2016-11-04 16:33:40
$dictionary["Contact"]["fields"]["pr_pricing_contacts"] = array (
'name' => 'pr_pricing_contacts',
'type' => 'link',
'relationship' => 'pr_pricing_contacts',
'source' => 'non-db',
'module' => 'PR_Pricing',
'bean_name' => false,
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_PR_PRICING_TITLE',
'id_name' => 'pr_pricing_contactspr_pricing_ida',
);
$dictionary["Contact"]["fields"]["pr_pricing_contacts_name"] = array (
'name' => 'pr_pricing_contacts_name',
'type' => 'relate',
'source' => 'non-db',
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_PR_PRICING_TITLE',
'save' => true,
'id_name' => 'pr_pricing_contactspr_pricing_ida',
'link' => 'pr_pricing_contacts',
'table' => 'pr_pricing',
'module' => 'PR_Pricing',
'rname' => 'name',
);
$dictionary["Contact"]["fields"]["pr_pricing_contactspr_pricing_ida"] = array (
'name' => 'pr_pricing_contactspr_pricing_ida',
'type' => 'link',
'relationship' => 'pr_pricing_contacts',
'source' => 'non-db',
'reportable' => false,
'side' => 'left',
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_PR_PRICING_TITLE',
);
In /custom/modules/Contacts/Ext/Vardefs there is a file called vardefs.ext.php, which has this contents (as well as a lot more):
// created: 2016-11-04 16:33:40
$dictionary["Contact"]["fields"]["pr_pricing_contacts"] = array (
'name' => 'pr_pricing_contacts',
'type' => 'link',
'relationship' => 'pr_pricing_contacts',
'source' => 'non-db',
'module' => 'PR_Pricing',
'bean_name' => false,
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_PR_PRICING_TITLE',
'id_name' => 'pr_pricing_contactspr_pricing_ida',
);
$dictionary["Contact"]["fields"]["pr_pricing_contacts_name"] = array (
'name' => 'pr_pricing_contacts_name',
'type' => 'relate',
'source' => 'non-db',
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_PR_PRICING_TITLE',
'save' => true,
'id_name' => 'pr_pricing_contactspr_pricing_ida',
'link' => 'pr_pricing_contacts',
'table' => 'pr_pricing',
'module' => 'PR_Pricing',
'rname' => 'name',
);
$dictionary["Contact"]["fields"]["pr_pricing_contactspr_pricing_ida"] = array (
'name' => 'pr_pricing_contactspr_pricing_ida',
'type' => 'link',
'relationship' => 'pr_pricing_contacts',
'source' => 'non-db',
'reportable' => false,
'side' => 'left',
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_PR_PRICING_TITLE',
);
My theory is that having the same code in both locations is causing it to be included twice, creating the problematic error messages. Note the date and timestamp on each is identical, so this was done by Studio⌠and I believe is a bug in studio (or was a bug in studio at the time when this relationship was defined.
There is also a file in /custom/Extension/modules/PR_Pricing/Ext/Vardefs called âpr_pricing_contacts_PR_Pricing.phpâ which contains:
<?php
// created: 2016-11-04 16:33:40
$dictionary["PR_Pricing"]["fields"]["pr_pricing_contacts"] = array (
'name' => 'pr_pricing_contacts',
'type' => 'link',
'relationship' => 'pr_pricing_contacts',
'source' => 'non-db',
'module' => 'Contacts',
'bean_name' => 'Contact',
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_CONTACTS_TITLE',
'id_name' => 'pr_pricing_contactscontacts_idb',
);
$dictionary["PR_Pricing"]["fields"]["pr_pricing_contacts_name"] = array (
'name' => 'pr_pricing_contacts_name',
'type' => 'relate',
'source' => 'non-db',
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_CONTACTS_TITLE',
'save' => true,
'id_name' => 'pr_pricing_contactscontacts_idb',
'link' => 'pr_pricing_contacts',
'table' => 'contacts',
'module' => 'Contacts',
'rname' => 'name',
'db_concat_fields' =>
array (
0 => 'first_name',
1 => 'last_name',
),
);
$dictionary["PR_Pricing"]["fields"]["pr_pricing_contactscontacts_idb"] = array (
'name' => 'pr_pricing_contactscontacts_idb',
'type' => 'link',
'relationship' => 'pr_pricing_contacts',
'source' => 'non-db',
'reportable' => false,
'side' => 'left',
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_CONTACTS_TITLE',
);
And there is also a file in /custom/modules/PR_Pricing/Ext/Vardefs called âvardefs.ext.phpâ which containts:
// created: 2016-11-04 16:33:40
$dictionary["PR_Pricing"]["fields"]["pr_pricing_contacts"] = array (
'name' => 'pr_pricing_contacts',
'type' => 'link',
'relationship' => 'pr_pricing_contacts',
'source' => 'non-db',
'module' => 'Contacts',
'bean_name' => 'Contact',
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_CONTACTS_TITLE',
'id_name' => 'pr_pricing_contactscontacts_idb',
);
$dictionary["PR_Pricing"]["fields"]["pr_pricing_contacts_name"] = array (
'name' => 'pr_pricing_contacts_name',
'type' => 'relate',
'source' => 'non-db',
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_CONTACTS_TITLE',
'save' => true,
'id_name' => 'pr_pricing_contactscontacts_idb',
'link' => 'pr_pricing_contacts',
'table' => 'contacts',
'module' => 'Contacts',
'rname' => 'name',
'db_concat_fields' =>
array (
0 => 'first_name',
1 => 'last_name',
),
);
$dictionary["PR_Pricing"]["fields"]["pr_pricing_contactscontacts_idb"] = array (
'name' => 'pr_pricing_contactscontacts_idb',
'type' => 'link',
'relationship' => 'pr_pricing_contacts',
'source' => 'non-db',
'reportable' => false,
'side' => 'left',
'vname' => 'LBL_PR_PRICING_CONTACTS_FROM_CONTACTS_TITLE',
);
Now, in projects, I get this error for âcontactsâ but I donât get this error for âaccountsâ. And there is no file in /custom/Extension/modules/Project/Ext/Vardefs called âproject_accountsâ or anything similar. Which makes me wonder if I should just delete those files in the Ext folder for each module⌠and the world will be happy again.
HOWEVER, I also donât get this error message for pr_pricing_activities_calls, emails, meetings, notes, or tasks⌠and there are files for each of those within /custom/Extension/modules/PR_Pricing/Ext/Vardefs⌠however, the contents are a bit more simplified in each of these:
vardefs.ext.php (related to notes):
// created: 2016-11-04 16:33:40
$dictionary["PR_Pricing"]["fields"]["pr_pricing_activities_notes"] = array (
'name' => 'pr_pricing_activities_notes',
'type' => 'link',
'relationship' => 'pr_pricing_activities_notes',
'source' => 'non-db',
'module' => 'Notes',
'bean_name' => 'Note',
'vname' => 'LBL_PR_PRICING_ACTIVITIES_NOTES_FROM_NOTES_TITLE',
);
pr_pricing_activities_notes_PR_Pricing.php:
<?php
// created: 2016-11-04 16:33:40
$dictionary["PR_Pricing"]["fields"]["pr_pricing_activities_notes"] = array (
'name' => 'pr_pricing_activities_notes',
'type' => 'link',
'relationship' => 'pr_pricing_activities_notes',
'source' => 'non-db',
'module' => 'Notes',
'bean_name' => 'Note',
'vname' => 'LBL_PR_PRICING_ACTIVITIES_NOTES_FROM_NOTES_TITLE',
);
pr_pricing_activities_notes_Notes.php:
<?php
// created: 2016-11-04 16:33:40
$dictionary["Note"]["fields"]["pr_pricing_activities_notes"] = array (
'name' => 'pr_pricing_activities_notes',
'type' => 'link',
'relationship' => 'pr_pricing_activities_notes',
'source' => 'non-db',
'module' => 'PR_Pricing',
'bean_name' => false,
'vname' => 'LBL_PR_PRICING_ACTIVITIES_NOTES_FROM_PR_PRICING_TITLE',
);
And vardefs.ext.php in /custom/modules/Notes/Ext/Vardefs:
// created: 2016-11-04 16:33:40
$dictionary["Note"]["fields"]["pr_pricing_activities_notes"] = array (
'name' => 'pr_pricing_activities_notes',
'type' => 'link',
'relationship' => 'pr_pricing_activities_notes',
'source' => 'non-db',
'module' => 'PR_Pricing',
'bean_name' => false,
'vname' => 'LBL_PR_PRICING_ACTIVITIES_NOTES_FROM_PR_PRICING_TITLE',
);
So the notes example kindof bursts my bubble on thinking Iâve found a fix for this.
Yikes this is a long post⌠sieberta