Cannot remove ANY relationships

Hi all

I’m currently unable to remove any relationships such as removing a Contact from a Target List.

I get the pop-up asking me to confirm, click yes and I’m momentarily shown my home screen before going back to the Target List and the Contact has not been removed.

Frustratingly my log is completely empty so I don’t have any error message to report.

Any advice would be appreciated :unsure:

After setting Log Level to Debug and running again I get the following:

Fri May 20 12:23:01 2016 [4809][-none-][DEBUG] Hook called: ::after_entry_point
Fri May 20 12:23:01 2016 [4809][-none-][DEBUG] Including module specific hook file for custom/modules
Fri May 20 12:23:01 2016 [4809][-none-][DEBUG] Including Ext hook file for custom/application
Fri May 20 12:23:01 2016 [4809][-none-][DEBUG] Hook called: ::server_round_trip
Fri May 20 12:23:01 2016 [4809][-none-][DEBUG] Calling MySQLi::disconnect()

Is this unusual?

I’m not quite sure what else to say as I’m not a server guy or particularly php/js literate
Suite’s log doesn’t seem to tell me anything even when set to debugging

Browser consoles give me the following feedback when I attempt to remove a contact from a target list

09:55:47.515 unreachable code after return statement1 sugar_grp1.js:188:8

XHR finished loading: GET sugar_grp1_jquery.js?v=FjFNQFeac3cnfbbZxO8r0A

http_fetch_sync @ sugar_grp1.js?v=FjFNQFeac3cnfbbZxO8r0A:273
showSubPanel @ SubPanelTiles.js?v=xXFsjP81WLz1CSfOi68yKA:92
sub_p_rem @ SubPanelTiles.js?v=xXFsjP81WLz1CSfOi68yKA:52
(anonymous function) @ VM358056:1

Resource interpreted as Document but SubPanelTiles.js?v=K686V1JSgKF_LtDFhUHplw:76 transferred with MIME type image/gif: http://xxxx/index.php?entryPoint=getImage&imageName=blank.png".
got_data @ SubPanelTiles.js?v=K686V1JSgKF_LtDFhUHplw:76
showSubPanel @ SubPanelTiles.js?v=K686V1JSgKF_LtDFhUHplw:89
sub_p_rem @ SubPanelTiles.js?v=K686V1JSgKF_LtDFhUHplw:49
(anonymous function) @ VM252343:1

XHR finished loading: POST sugar_grp1_jquery.js?v=YJYFOy_vWUtwYeGBayYLzA:4

k.cors.a.crossDomain.send @ sugar_grp1_jquery.js?v=YJYFOy_vWUtwYeGBayYLzA:4
n.extend.ajax @ sugar_grp1_jquery.js?v=YJYFOy_vWUtwYeGBayYLzA:4
update_screen_resolution @ style.js?v=UzNqdnCORRI0ZGr03IiaeA:389
(anonymous function) @ style.js?v=UzNqdnCORRI0ZGr03IiaeA:382

XHR finished loading: GET sugar_grp1_jquery.js?v=UzNqdnCORRI0ZGr03IiaeA:4

k.cors.a.crossDomain.send @ sugar_grp1_jquery.js?v=UzNqdnCORRI0ZGr03IiaeA:4
n.extend.ajax @ sugar_grp1_jquery.js?v=UzNqdnCORRI0ZGr03IiaeA:4
Alerts.updateManager @ sugar_grp1.js?v=UzNqdnCORRI0ZGr03IiaeA:23
updateMissed @ sugar_grp1.js?v=UzNqdnCORRI0ZGr03IiaeA:28

Is there anything unusual about the above? I’d really appreciate any feedback on this as not being able to un-link contacts from accounts or target lists is really problematic.


Did you turn on PHP logging (in php.ini) and check your php_errors.log?

Hi pgr

Our php_errors_log is full of the following:

PHP Strict Standards: Declaration of SugarFieldMultienum::displayFromFunc() should be compatible with SugarFieldEnum::displayFromFunc($displayType, $parentFieldArray, $vardef, $displayParams, $tabindex = 0) in xxxx/include/SugarFields/Fields/Multienum/SugarFieldMultienum.php on line 43

There are so many things in the logs, most of them you can safely ignore.

Try to look closely at things happening at the exact moment when you try to delete the relationship and it fails.

Another approach is to grep it to show only some errors, there might be clues here:

cat php_errors.log | grep -i fatal
cat php_errors.log | grep -i error

but, again, there might be things here that are safe to ignore, like a repetitive error in SugarTheme.php, for example. You have to try and find something that looks suspicious in connection to your specific problem.

Hi pgr

Unfortunately the log only seems to display the following 2 messages looping:

[24-May-2016 10:34:04 UTC] PHP Strict Standards: Declaration of SugarFieldMultienum::displayFromFunc() should be compatible with SugarFieldEnum::displayFromFunc($displayType, $parentFieldArray, $vardef, $displayParams, $tabindex = 0) in /home/xxxx/include/SugarFields/Fields/Multienum/SugarFieldMultienum.php on line 43/124

[24-May-2016 10:34:05 UTC] PHP Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CampaignLog::get_related_name() should not be called statically in /home/xxxx/data/SugarBean.php on line 4135

Appreciate your help, it’s a shame there are no errors to report :confused:

The only other line I can find is:
[24-May-2016 08:50:31 UTC] PHP Strict Standards: Only variables should be passed by reference in /home/xxxx/include/utils.php on line 4726

Needless to say I’ve checked the logs again and still nothing, and I’ve run rebuilds from admin. I don’t think it’s permissions related as I’m a system administrator and my colleagues are having the same issue.

Surely I can’t be the only person who’s experienced this?

The permissions are worth investigating anyway because they are the source of MANY weird behaviors in SuiteCRM.

It doesn’t matter if you’re a sysadmin or not, the issue is about the Apache daemon (not your user) being able to access certain files, and (for some obscure reason I still don’t understand) these permissions get changed when things get moved around by upgrades, changes in Studio or Module Builder, etc.

If that fails, I would try clearing the relationships from the database (using mySqlAdmin or equivalent) because the problem could be something that went wrong when creating them in the first place. I would look for errors logged in the moment of creation of relationships also.

Hi pgr,

We’ve checked the permissions and have set everything to either 775 or 755 as mentioned in posts such as

We saw that many permissions had been set to 644 though I’m sure that’s not how we initially set up

Would clearing the relationships break every relationship that’s currently set up? We have thousands of contacts linked to hundreds of accounts and emails etc so we’re hesitant to do anything drastic!


I am not recommending that you clear out the entire Relationship table, that would indeed by tragic.

What I am saying is that you could explore some options to diagnose your problem by using direct database access. It would be much better if you could do this on a separate server with a clone of your database.

But if you do it on the actual server, do it by testing only a single record. You can figure out the database structure fairly easily. You have the main tables for each entity (Contacts, Accounts, etc.), you have extra tables for custom fields (if you have custom fields), like accounts_cstm, etc. Then you have tables for relationships like accounts_calls, accounts_contacts, etc.

If you delete a row from one of these relationship tables, the entities continue to exist but their relationship is broken.

Do you have some relationships that keep working well, or are ALL your relationships now impossible to remove? Because if you have different behaviors for different records, you can try to see if there is anything different in the way things got created in the database.

Anyway, after all this talk, I would say a better option for you to debug this situation would be to actually debug it, use a debugger to step through your code, get to the exact point where the relationship-delete is breaking, and see what is wrong. If you have a live system with lots of data, you should seriously consider this, even if it represents a big effort for you, or if it requires hiring outside help.

1 Like

Hi pgr

It’s a problem with removing all relationships (contact-account-target list-email etc). We click remove, confirm, page breaks and then reassembles with zero changes made (if Ajax is enabled, if not it just stays broken up).

Thanks for your help and we will attempt some of your suggestions and will report any success. It’s likely that we may start afresh with another install and simply re-import all our data and recreate our custom fields etc, but hopefully we won’t have to!

It’s a pity because that sounds just like some minor detail broke, some file got corrupted or some permission problem that is a bit weirder than usual. Stepping through the code would let you find the problem for sure.

Maybe you can start from a backup a bit earlier than the first manifestation of the problem, and upload your most current data to it. That would save you much work with customizations, etc.

If you start from a fresh install, and it is self hosted, consider making it inside a Virtual Machine. There are so many advantages.

Fortunately my colleague has been able to reinstall and copy across most of our files, relationships are behaving normally again and it looks like we haven’t lost any data. I can only assume that you’re correct and that a minor fault developed somewhere and messed up our permissions/relationships. Now we can continue on as normal and will probably avoid touching anything!

Thanks for your time!