-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deleting an item from a Contact History throws exception. #3587
Comments
I am unable to recreate the scenario, as it is working fine on my side. |
@jobst I was able to replicate this by quick composing an email through the activities subpanel and changing the "related to" field to "none". However I am unable to replicate this with any other record type. Can you confirm if this is the same on your end? or are emails with contacts/notes causing the same issue? |
@Dillon-Brown I am trying to figure this one out, too:
|
@Dillon-Brown I was able to delete some but not others (mostly old ones), however I am able to delete a newly created one ... you might want to check older ones? I do not understand why this happened. I know the cause - the relationship info IS missing in the database, but I cannot look back in time to see why it was not created and/or whether is was a problem of the rest interface OR the application entering the data OR an upgrade of SugarCRM or SuiteCRM. One thing that should be if this happens: it should be able to display an error message to the user and what can be done to still delete this information. You can delete this information by clicking on the subject line then delete it there. If you look at the code in SUITECRM/include/generic/DeleteRelationship.php on line 91 Depending on the browser and the setting in the php.ini it will either display the thrown error (chrome) or nothing (firefox) ... but in any case the history is gone - this should not be if the OBJECT is not defined but simply alert the user to the missing info. |
This issue is as a result of the enhancement of the list of emails in the History sub-panel. The list of Emails that you see in the History section are "enriched" with a query/function (get_unlinked_email_query) that returns additional historical information related to the Lead/Account/Contact/Prospect. The relationship is established due to the fact that the same email address is found somewhere in the email. So you could be seeing linked and unlinked emails in the History list. So I am suggesting the following possible solutions...
|
I have someone in the Forums getting this problem. I tried in my test system and I can reproduce. I don't have time to bugfix and debug, though. But @Dillon-Brown tell me if you think there's anything I can do for this issue... |
Can't replicate in 7.13.2. When I remove the record from the history subpanel it remains removed after the refresh |
Cannot delete an item from the history, it throws an exceptions.
Using the output of a suitecrm instance running on a PHP 7.1.2 host as this is way more informative:
[24-May-2017 15:36:48 Australia/Melbourne] PHP Notice: Undefined property: Contact::$get_unlinked_email_query in SUITECRM/include/generic/DeleteRelationship.php on line 90
[24-May-2017 15:36:48 Australia/Melbourne] PHP Notice: Trying to get property of non-object in SUITECRM/include/generic/DeleteRelationship.php on line 90
[24-May-2017 15:36:48 Australia/Melbourne] PHP Notice: Trying to get property of non-object in SUITECRM/include/generic/DeleteRelationship.php on line 90
[24-May-2017 15:36:48 Australia/Melbourne] PHP Notice: Undefined property: Contact::$get_unlinked_email_query in SUITECRM/include/generic/DeleteRelationship.php on line 92
[24-May-2017 15:36:48 Australia/Melbourne] PHP Fatal error: Uncaught Error: Call to a member function delete() on null in SUITECRM/include/generic/DeleteRelationship.php:92
Stack trace:
#0 SUITECRM/include/MVC/Controller/SugarController.php(928): require_once()
#1 SUITECRM/include/MVC/Controller/SugarController.php(394): SugarController->handleActionMaps()
#2 SUITECRM/include/MVC/Controller/SugarController.php(307): SugarController->process()
#3 SUITECRM/include/MVC/SugarApplication.php(105): SugarController->execute()
#4 SUITECRM/index.php(54): SugarApplication->execute()
#5 {main}
thrown in SUITECRM/include/generic/DeleteRelationship.php on line 92
Issue
This has been tried on PHP7.1.2 and 5.6.30 so it's not PHP related but also not Theme related as I tried it in 3 different themes Suite [7|P|R].
When clicking on the right dialog box (remove function) to remove an item a confirm box ask whether to do this, clicking yes will make all history disappear (as an error occurs in the script) and nothing happens.
A refresh of the page will show the list as it was, the item was NOT deleted.
Expected Behavior
Item deleted
Actual Behavior
Item still there
Possible Fix
too many other things to do.
Steps to Reproduce
6 history list gone but item still there after refresh
Context
cant delete anything.
Your Environment
The text was updated successfully, but these errors were encountered: