PLEASE UPDATE YOUR BROWSER

1 Reason Agency

Insurance and Real Estate

  • About
    • Meet Our Agents
    • Partner Insurance Companies
  • Personal Insurance
    • Car Insurance Quote for Personal Auto
    • Boat Insurance
    • Home Owners Insurance
    • Life Insurance Quotes
    • Motorcycle Insurance
    • Personal Umbrella Insurance
    • Renters Insurance
    • RV Camper Insurance
    • Snowmobile Insurance
  • Business Insurance
    • Commercial Auto Insurance
    • What is General Liability Insurance
    • Rental or Vacant Properties
    • Workers Compensation in Wisconsin
  • Blog
  • Contact
    • Contribute As Guest Author
  • About
    • Meet Our Agents
    • Partner Insurance Companies
  • Personal Insurance
    • Car Insurance Quote for Personal Auto
    • Boat Insurance
    • Home Owners Insurance
    • Life Insurance Quotes
    • Motorcycle Insurance
    • Personal Umbrella Insurance
    • Renters Insurance
    • RV Camper Insurance
    • Snowmobile Insurance
  • Business Insurance
    • Commercial Auto Insurance
    • What is General Liability Insurance
    • Rental or Vacant Properties
    • Workers Compensation in Wisconsin
  • Blog
  • Contact
    • Contribute As Guest Author
Home > SuiteCRM Insurance CRM > Warning: Multiple links found for relationship – Suitecrm

Warning: Multiple links found for relationship – Suitecrm

Posted on: February 12, 2019 By: robert

From Github – https://github.com/salesagility/SuiteCRM/issues/6507

Fixing:
change to /data/Relationships/M2MRelationship.php to downgrade this to a warning so it wouldn’t fill the logs (if log level at Error). This is not an upgrade-safe change.

~ Line 90:

$GLOBALS['log']->warn("Warning: Multiple links found for relationship {$this->name} within module {$module}");             
//$GLOBALS['log']->error("Warning: Multiple links found for relationship {$this->name} within module {$module}");

Fix is from suitecrm https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/12382-help-with-log-errors-multiple-links-found-for-relationship

This seems to come from M2MRelationship.php, which calls getLinkFieldForRelationship from VardefManager.php, which if it isn’t in cache calls getLinkFieldsforModule from the same file.

getLinkFieldsforModule, if I read correctly, returns each $dictionary entry where ‘type’ == ‘link’ and ‘relationship’ key is defined (and not empty). I believe, that if it finds multiple entries, that meet that criteria, the error is thrown. You’ll notice in my accounts<->contacts example, the first and third entries that are created are both ‘type’ == ‘link’ and both have ‘relationship’ key defined.

$dictionary["Account"]["fields"]["accounts_contacts_1"] = array (
  'name' => 'accounts_contacts_1',
  'type' => 'link',
  'relationship' => 'accounts_contacts_1',
  'source' => 'non-db',
  'module' => 'Contacts',
  'bean_name' => 'Contact',
  'vname' => 'LBL_ACCOUNTS_CONTACTS_1_FROM_CONTACTS_TITLE',
  'id_name' => 'accounts_contacts_1contacts_idb',
);
$dictionary["Account"]["fields"]["accounts_contacts_1_name"] = array (
  'name' => 'accounts_contacts_1_name',
  'type' => 'relate',
  'source' => 'non-db',
  'vname' => 'LBL_ACCOUNTS_CONTACTS_1_FROM_CONTACTS_TITLE',
  'save' => true,
  'id_name' => 'accounts_contacts_1contacts_idb',
  'link' => 'accounts_contacts_1',
  'table' => 'contacts',
  'module' => 'Contacts',
  'rname' => 'name',
  'db_concat_fields' =>
  array (
    0 => 'first_name',
    1 => 'last_name',
  ),
);
$dictionary["Account"]["fields"]["accounts_contacts_1contacts_idb"] = array (
  'name' => 'accounts_contacts_1contacts_idb',
  'type' => 'link',
  'relationship' => 'accounts_contacts_1',
  'source' => 'non-db',
  'reportable' => false,
  'side' => 'left',
  'vname' => 'LBL_ACCOUNTS_CONTACTS_1_FROM_CONTACTS_TITLE',
);

Whereas, in modules/Accounts/vardefs.php, contacts is simply defined with one entry:

        'contacts' => array(
            'name' => 'contacts',
            'type' => 'link',
            'relationship' => 'accounts_contacts',
            'module' => 'Contacts',
            'bean_name' => 'Contact',
            'source' => 'non-db',
            'vname' => 'LBL_CONTACTS',
        ),

Now I assume some of that extra code is necessary, but it also seems to generate the error in the logs

Comments

comments

Categories: SuiteCRM Insurance CRM

Categories

  • Bookkeeping
    • Business Taxes
  • Business Marketing
  • Car Insurance
  • Commercial Auto
  • Commercial Insurance
  • Court Cases
  • Cyber Liability Insurance
  • Employment Opportunities
  • Employment Practices
  • Flood Insurance
  • Home Ownership
  • Homeowner's Insurance
  • Insurance Companies
    • Insurance News
  • Insurance Terms
  • Investing
    • Finance & Insurance News
  • Life Insurance
  • Non Emergency Medical Transportation
  • Payroll
  • Pinewood Derby
  • Real Estate News
  • Rental Property Insurance
  • Retirement & Estate Planning
  • RV Insurance
  • Starting A Business
  • Stock Dividends
  • SuiteCRM Insurance CRM
  • Tips & Advice
  • Travel
  • Uncategorized
  • Webhosting
  • Worker's Compensation

Recent Posts

  • Realtor Chad Kaltenbach Receives 2020 Good Neighbour Award from National Association of Realtors
  • Park Hotels & Resorts Announces Tax Treatment of 2020 Dividends
  • American Assets Trust, Inc. Announces Fourth Quarter and Year-End 2020 Earnings Release Date and Conference Call Information
  • Concord RENTS Announces an Open House, Saturday January 16th for Reserve at Orange City Apartment Homes
  • Greystone Provides $11.4 Million in Fannie Mae DUS® Financing for Two Multifamily Communities in Florida
  • Harbor Custom Development Announces Closing of Public Offering
  • Landsea Homes to Ring the Nasdaq Closing Bell on January 21st in Celebration of Going Public
  • Brookfield Office Properties Inc. Announces Renewal of Normal Course Issuer Bid for Preferred Shares