Case Description field text entry isn't saved after upgrading to 7.10.4

Hello,

we uprgraded our production SuiteCRM instance from 7.9.7 to 7.10.4. After upgrading, when we create a new case and save it, the text we typed in in the Case Description (Description) field isn’t saved. The Description is blank in the assingment notification e-mail. Also blank is the Description field in the Detail View of the newly created case.

If we edit the case we just created and type in or copy-paste some text in the Descption field, this time after saving the ticket the text is saved and displayed.

This doesn’t appear to be a system wide issue related to the Text Area type fields. For instance, in the Opportunities module, when we create a new opportunity, the text in the corresponding Desccription field text is stored when the user saves the new opportunity entry. Same with the Calls Module etc. The issue seems specific to cases.

Can you please point me how to check and troubleshoot this issue? Any help is truly appreciated.

Some system information:

OS: CentOS Linux 7.2.1511 (Core)‬
Plesk version: 12.5.30 Update #75
PHP version: 7.0.29
MySQL version: 5.5.56

Thank you,
John

Hi,
can you please check the Hooks of the cases module? before and after save hooks
is the description value appearing in the hook code?

Thanks

Hello,

thank you very much for the prompt response. Do you mean the file in custom/modules/Cases/logic_hooks.php ?

These are the related lines I think. I compared with the same file in my 7.9.7 backup and there is no change:


$hook_array['before_save'] = Array(); 
$hook_array['before_save'][] = Array(1, 'Cases push feed', 'modules/Cases/SugarFeeds/CaseFeed.php','CaseFeed', 'pushFeed'); 
$hook_array['before_save'][] = Array(10, 'Save case updates', 'modules/AOP_Case_Updates/CaseUpdatesHook.php','CaseUpdatesHook', 'saveUpdate'); 
$hook_array['before_save'][] = Array(11, 'Save case events', 'modules/AOP_Case_Events/CaseEventsHook.php','CaseEventsHook', 'saveUpdate'); 
$hook_array['before_save'][] = Array(12, 'Case closure prep', 'modules/AOP_Case_Updates/CaseUpdatesHook.php','CaseUpdatesHook', 'closureNotifyPrep'); 
$hook_array['before_save'][] = Array(77, 'updateGeocodeInfo', 'modules/Cases/CasesJjwg_MapsLogicHook.php','CasesJjwg_MapsLogicHook', 'updateGeocodeInfo'); 
$hook_array['after_save'] = Array(); 
$hook_array['after_save'][] = Array(10, 'Send contact case closure email', 'modules/AOP_Case_Updates/CaseUpdatesHook.php','CaseUpdatesHook', 'closureNotify'); 
$hook_array['after_save'][] = Array(77, 'updateRelatedMeetingsGeocodeInfo', 'modules/Cases/CasesJjwg_MapsLogicHook.php','CasesJjwg_MapsLogicHook', 'updateRelatedMeetingsGeocodeInfo'); 

You can check the modules/Cases/SugarFeeds/CaseFeed.php file and can write the following code there. After saving a new records you will have to check the log files. From there you can see the description value of the current record.

$GLOBALS[‘log’]->fatal('Description Value= '.$bean->description);

You should write this line after this line

function pushFeed($bean, $event, $arguments){

Thanks

Thank you again,

Unfortunately, after adding this line I cannot create new cases. When I click save SuiteCRM crashes and I see an HTTP error 500 in my browser (This page isn’t working. SuiteCRM is currently unable to handle this request. HTTP ERROR 500).

The case isn’t created.

I am sorry but you have added the code at wrong line.

Can you paste your function code here. Or share it with me via skype (sohaib.majeed44)

Any other suggestions please?

We are having the same issue.

Here is the error log entry:

[Thu Apr 26 12:02:47 2018] [error] [client 192.168.101.10] PHP Notice: Undefined property: aCase::$type in /var/www/html/suitecrm/modules/AOP_Case_Events/CaseEventsHook.php on line 74, referer: http://192.168.101.55/suitecrm/index.php

After some testing, the description is saved when we use internet explorer 11. The issue appears when we use Firefox and Chrome.

Any ideas why would that be?

If it’s Browser-specific, you’ll probably find a javascript error in your Browser’s Developer Console.

Hello pgr,

thank you for your response. This is what I see in Firefox developer’s console:

I can’t reproduce this problem in my 7.10.4.

And I can’t learn much from your browser error…

The last post here has a workaround, if you don’t need the fancy formatting in the Description field:

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/4276-how-to-disable-tinymce-editor-for-the-status-descrption-field-in-cases-module

I saw this new Issue on GitHub, is that you there? :slight_smile:

https://github.com/salesagility/SuiteCRM/issues/5834

No, it isn’t me but thank you for letting me know.

Not my case (I can see the description field and I can type in it. My issue is that when I save the new case, what I typed in the description field isn’t saved) but I will follow the topic.

I do not believe this is browser specific. I have tried it with Chrome, Firefox, Edge on Linux and Window10.

Just tried again with Edge same error:

[Tue May 08 11:41:57 2018] [error] [client 192.168.101.10] PHP Notice: Undefined property: aCase::$type in /var/www/html/suitecrm/modules/AOP_Case_Events/CaseEventsHook.php on line 74, referer: http://192.168.101.55/suitecrm/index.php

The Github Issue linked above already has a proposed fix that you guys can help test.

There are two different PR’s

https://github.com/salesagility/SuiteCRM/pull/5672/files
https://github.com/salesagility/SuiteCRM/pull/5816/files

I have the same problem in 7.10.5 version but the code is different. Anyone knows how to made these changes to 7.10.5?

What exactly is the code difference that’s confusing you? I just checked my 7.10.5 and it looks like these fixes are already there. Note that box fixes are on the same block of code, on the same file, and that only one of them was merged into the app in 7.10.5. The other one is superseded by this one.

Now, how exactly do you get the bug? There is a user on that PR claiming that

I analize the situation with my user and she register cases using the cases subpanel inside accounts module. When she register using cases module works fine.

I added your description here

https://github.com/salesagility/SuiteCRM/pull/5672

you can follow that PR to see if there are any updates to this bug. Thanks.