500 Internal Server Error when defining condition on Workflow

My organization is running on-premise SugarCRM 6.1.2. I am attempting to create a Workflow that uses "Contracts" as the target module. When I attempt to create a condition on this workflow using the "When the target module changes and a field in a related module contains a specified value" option, the application returns a 500 Internal Server error when I attempt to select the related module. The apache logs on the server contain the following entries:

[Fri Jun 19 14:20:49 2020] [error] [client 69.114.82.41] PHP Notice:  Undefined property: Contract::$contracts_cases in /srv/www/htdocs/include/VarDefHandler/VarDefHandler.php on line 96, referer: [URL redacted]

[Fri Jun 19 14:20:49 2020] [error] [client 69.114.82.41] PHP Fatal error:  Call to a member function getRelatedModuleName() on a non-object in /srv/www/htdocs/include/VarDefHandler/VarDefHandler.php on line 96, referer: [URL redacted]

On screen, this feature would normally display a list of related modules to select from, but the pop-up window that ordinarily displays the selector controls shows the 500 error. The error logs point to problems in the relationship between the Contracts and Cases modules; this relationship was created between those modules by administrators in my organization using Studio and is not one of the standard relationships in the default SugarCRM schema.

I have attempted the following to resolve the issue:

  1. Quick Repair and Rebuild. This step revealed some synchronization problems between the database and vardefs. I applied the changes to the database schema. This did not resolve the issue.
  2. Rebuild Relationships. This rebuild completed successfully but still did not repair the issue.

I am looking for suggestions as to next steps to take in resolving this issue. Any guidance is appreciated. Please let me know if any additional information would be helpful is troubleshooting this issue.

Greg

  • HI Greg,

    6.1.2 has been a while :) I checked the archives and it seems for those versions there were some (ancient) bugs documented where Studio leaves over some incorrect relationship definitions, like portal.sugarondemand.com/ fixed in 6.2.3

    You could check for relationship files in 

    /custom/Extension/modules/relationships/relationships/

    And probably also in the VarDefs for the modules, you could search the files in custom for contracts_cases to see where this pops up. 

    However, I think the best recommendation would be to try and migrate to a current release (10.0.x) to confirm it was resolved along the way ( and benefit from all the other changes since 2011 ;) 

    Best, 

    Dennis