Studio> error loading relationships on some modules


I can no longer view relationships for some of my modules in studio. As soon as i click on the ‘relationship’ item in the module tree the page freezes. Chrome throws the following error:-

sugar_grp1_yui.js?v=ObZbPbT6NrEtSxsMfsfO7w:55 POST 500 (Internal Server Error)

asyncRequest @ sugar_grp1_yui.js?v=ObZbPbT6NrEtSxsMfsfO7w:55
asyncRequest @ ModuleBuilder.js?v=ObZbPbT6NrEtSxsMfsfO7w:1164
getContent @ ModuleBuilder.js?v=ObZbPbT6NrEtSxsMfsfO7w:527
handleTreeClick @ ModuleBuilder.js?v=ObZbPbT6NrEtSxsMfsfO7w:934
notify @ sugar_grp1_yui.js?v=ObZbPbT6NrEtSxsMfsfO7w:30
fire @ sugar_grp1_yui.js?v=ObZbPbT6NrEtSxsMfsfO7w:30
fireEvent @ sugar_grp1_yui.js?v=ObZbPbT6NrEtSxsMfsfO7w:32
_onClickEvent @ treeview-min.js:7
n @ sugar_grp1_yui.js?v=ObZbPbT6NrEtSxsMfsfO7w:25

At first i thought it may be to do with custom relationships, however some modules with custom entries load fine. There are no entries in suitecrm log, just in the browser.

I cant figure why it works for some modules and not others?


Maybe Admin / Repair / Repair relationships?

Followed by javascript repairs

No luck unfortunately,

It is very inconsistent behaviour. Some modules work fine, others throw the error.

For example, i have never customised the maps module or added any relationships for it, but

Map Address Cache, Map Areas, and Map Markers all work correctly, but Maps throws the error?

I have not changed/customised anything since upgrading to 7.9.9, but the following log is created in apache when i try to view the relationships in studio.

PHP Fatal error: Cannot redeclare display_shipping_vat() (previously declared in /var/www/crm/custom/modules/AOS_Products_Quotes/Line_Items.php:264) in /var/www/crm/modules/AOS_Products_Quotes/Line_Items.php on line 258, referer:

I deleted the custom Line_Items.php file and then apache threw errors saying it could not find the file. I created a blank file with the same name and studio correctly loaded the relationships. However the quotes and invoices were then missing the line items.

I then tried copying the main Line_Items.php file into the custom folder - invoices then showed correctly however the studio error returned.

I have made no changes since upgrading -

I’d say the correct approach would be to delete the custom Line_Items.php file and then clear the Apache error by finding out which other file is referencing and trying to load that custom file.

1 Like

Sorted, thank you.

A file in custom\Extension\modules\AOS_Quotes\Ext\Vardefs had

$dictionary[‘AOS_Quotes’][‘fields’][‘line_items’][‘function’] [‘include’] = ‘custom/modules/AOS_Products_Quotes/Line_Items.php’;
$dictionary[‘AOS_Quotes’][‘fields’][‘shipping_tax_amt’][‘function’] [‘include’] = ‘custom/modules/AOS_Products_Quotes/Line_Items.php’;

Which i had customised a while back - this had worked fine until the upgrade so not sure why it doesn’t now.

I’ve lost the customised line items for now, but at least studio is up and running again.