Task due date is not saved

Guys, I would really appreciate any help on this topic ā€¦

I asked this question already three days before ā€¦

We have a new 7.12.7 installation.

When the ā€œcreate taskā€ window is opened, filled and saved, all is saved but not the due date.

When the due date is entered directly into the database table, it is shown in the task form as well as the ā€œview tasksā€ list.

When one opens the task form and changes the task due date, it is deleted. Neither the old, nor the new due date is available further on.

If a task form is opened in edit mode, and saved again without any changes, the due date ist deleted also.

It seems tha the edit script has a mistake.

Where do we have to look at?

Regards

Do you see any error message in any of the two logs, or in the browserā€™s developer tools console?

suitecrm.log tells:
##########################################
Fri Nov 11 23:33:43 2022 [11649][1][DEPRECATED] Array
(
)

Fri Nov 11 23:33:43 2022 [11649][1][WARN] CSS File Dawn/yui.css not found
Fri Nov 11 23:33:47 2022 [11649][1][DEPRECATED] Array
(
)

Fri Nov 11 23:33:49 2022 [11649][1][DEPRECATED] Array
(
)

Fri Nov 11 23:33:49 2022 [11649][1][DEPRECATED] AOD Lucene search is deprecated since v7.12.0
Fri Nov 11 23:33:50 2022 [11649][1][DEPRECATED] AOD Lucene search is deprecated since v7.12.0
Fri Nov 11 23:33:50 2022 [11646][1][DEPRECATED] Array
(
)

Fri Nov 11 23:33:50 2022 [11646][1][WARN] CSS File Dawn/yui.css not found
Fri Nov 11 23:33:51 2022 [11646][1][DEPRECATED] Array
(
)

Fri Nov 11 23:33:53 2022 [11649][1][DEPRECATED] Array
(
)

Fri Nov 11 23:34:54 2022 [11691][1][DEPRECATED] Array
(
)
##########################################
php_errors.log tells:
##########################################
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œLBL_SEARCH_BUTTONā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 662
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œenctypeā€ in cache/smarty/templates_c/%%FD^FDE^FDE09EAE%%EditView.tpl.php on line 22
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œreturn_relationshipā€ in cache/smarty/templates_c/%%FD^FDE^FDE09EAE%%EditView.tpl.php on line 55
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œrelate_toā€ in cache/smarty/templates_c/%%FD^FDE^FDE09EAE%%EditView.tpl.php on line 56
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œapp_stringsā€ in cache/smarty/templates_c/%%FD^FDE^FDE09EAE%%EditView.tpl.php on line 105
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%FD^FDE^FDE09EAE%%EditView.tpl.php on line 105
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Undefined array key ā€œapp_stringsā€ in cache/smarty/templates_c/%%FD^FDE^FDE09EAE%%EditView.tpl.php on line 937
[11-Nov-2022 23:33:43 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%FD^FDE^FDE09EAE%%EditView.tpl.php on line 937
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œmoduleListā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Trying to access array offset on value of type null in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 28
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œLBL_SEARCH_BUTTONā€ in cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 662
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œADMIN_EDITā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 69
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œhiddenā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 184
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œhiddenā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 224
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œhiddenā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 274
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œhiddenā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 312
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œhiddenā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 357
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œdefault_valueā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 362
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œhiddenā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 397
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œhiddenā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 442
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œhiddenā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 492
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œhiddenā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 536
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œhiddenā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 575
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œhiddenā€ in cache/smarty/templates_c/%%F4^F44^F44A0D07%%DetailView.tpl.php on line 607
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œcollapse_subpanelsā€ in cache/smarty/templates_c/%%9C^9C5^9C5769A9%%SubPanelTiles.tpl.php on line 16
[11-Nov-2022 23:33:50 Europe/Berlin] PHP Warning: Undefined array key ā€œcollapse_subpanelsā€ in cache/smarty/templates_c/%%9C^9C5^9C5769A9%%SubPanelTiles.tpl.php on line 16
##########################################
to my opinion nothing in the browsers developer tools console

Iā€™ve set log level to ā€œwarnā€ in admin - system settings ā€¦

Sorry, I donā€™t get any clues from there. :man_shrugging:

Somebody would have to hook up a debugger and step through that edit view Save actionā€¦

I think Iā€™ve found a hint now.

In Chrome developer tools console, when I enter a due date and press save, I get the following message:
############message#################
JQMIGRATE: Migrate is installed, version 3.3.2
sugar_grp1_jquery.js?v=4aSs8lMN-7E5r3E56frtSw:2 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end userā€™s experience. For more help, check https://xhr.spec.whatwg.org/.
send @ sugar_grp1_jquery.jsā€¦lMN-7E5r3E56frtSw:2
ajax @ sugar_grp1_jquery.jsā€¦lMN-7E5r3E56frtSw:2
s.ajax.s.ajax @ sugar_grp1_jquery.jsā€¦lMN-7E5r3E56frtSw:6
S. @ sugar_grp1_jquery.jsā€¦lMN-7E5r3E56frtSw:2
getJSON @ sugar_grp1_jquery.jsā€¦lMN-7E5r3E56frtSw:2
check_favorite @ favorites.js:65
(anonymous) @ favorites.js:12
############message#################

I think that message happens all the time, in many screens, and is not likely related to your problemā€¦

Iā€™ve thought about possible reasons ā€¦

  • permission: as with cache directory permission, which has to be adjusted to 775 for the UI to work, it could be a permission problem, but is not. Iā€™ve installed a fresh version, set all permissions to 777 but without success.
  • programming mistake: unlikely to my opinion, would have been found before.
  • call of a function or library with other version than in other forms, which does not run on this machine - possible
  • need of library which is not installed here - possible.

It would help to know which file exactly is responsible for the form and where is the difference between save button of start date and due date.

Regards

I donā€™t know where that is handled in the code, itā€™s probably quite complex, not just a single file.

Maybe itā€™s a data format issue. You might want to increase log level but then focus only on the specific things happening when saving that form. And try other date formats to see if any of them gets saved correctly.

I thought of date formats in the beginning and tried yyy-mm-dd as well as mm/dd/yyyy, both with same effect - dowsnā€™t work (would be astonishing otherwise, because start date is saved correctly).

What I did now:

  1. I found out, that sql queries are saved in the logfile when I set log level to debug mode.
  2. The sql command to look for should be an UPDATE command, when an entry of the task table in the database is changed.
  3. I downloaded the suitecrm.log (V1) just before editing a task.
  4. I opened an existing demo task, entered a due date value and saved.
  5. I again downloaded suitecrm.log (V2), and
  6. compared both versions of the file in editor.
  7. I searched for an ā€œupdate tasksā€ command in that part of V2 which does not exist in V1 (was not there before the update, tasks is the name of the database table)
  8. the following command can be found:
Sat Nov 12 22:41:45 2022 [20087][1][INFO] Query:UPDATE tasks
					SET `name`='demo',`date_modified`='2022-11-12 21:41:45',`modified_user_id`='1',`created_by`='1',`description`='frewzw45z',`assigned_user_id`='1',`status`='Not Started',`date_due_flag`=0,`date_due`=NULL,`date_start_flag`=0,`date_start`='2022-11-17 10:00:00',`parent_type`='Accounts',`parent_id`='',`contact_id`='',`priority`='High'
					 WHERE  tasks.id = '69a28a85-2ddc-703e-9c43-63700c1fa4cf' AND deleted=0
  1. As can be seen, the value of the date_due field is set to NULL

  2. to compare this behaviour with the update command of the start date field I did the same - saved suitecrm.log before update, changed the value of the start date field, saved suitecrm.log again, compared both files and looked for an update command in that part of the file which didnā€™t exist before the update

  3. The command I found looks like follows:

Sat Nov 12 23:12:56 2022 [20507][1][INFO] Query:UPDATE tasks
					SET `name`='demo',`date_modified`='2022-11-12 22:12:56',`modified_user_id`='1',`created_by`='1',`description`='frewzw45z',`assigned_user_id`='1',`status`='Not Started',`date_due_flag`=0,`date_due`=NULL,`date_start_flag`=0,`date_start`='2022-11-23 10:00:00',`parent_type`='Accounts',`parent_id`='',`contact_id`='',`priority`='High'
					 WHERE  tasks.id = '69a28a85-2ddc-703e-9c43-63700c1fa4cf' AND deleted=0
  1. As can be seen, an other start date value is saved, which was not the case with due date value - looks like a programming mistake ā€¦

The code surrounding that field is quite messy, because the two aggregator subpanels (Activities and History) combine more than one module, and sometimes they have to deal with incongruencies between those modules - like the field being called date_end instead of due_date, for example.

There are several issues around this on Github

This fix might be possible to reproduce for your case, in a different module:

but I am not sure. In theory your issue should not be related to subpanels, but it might be if the ā€œCreate taskā€ is launched from a subpanel.

ā†’ Fixed #5515 - Due date not showed anymore by Dillon-Brown Ā· Pull Request #6269 Ā· salesagility/SuiteCRM Ā· GitHub

Hi,

I have the same problem with the latest version of suitecrm 7.13.2.

When I try to create a task I donā€™t get the date in the due date field.

Checking the logs in debug mode, the insert query to the database shows the due date field with the value of Null.

I am using a new suitecrm from scratch without data or demo, only with the suitecrm structure and it fails me. I donā€™t know if this is a general error but I donā€™t know what to do to solve it.

I have a CRM instance that was updated from 7.13.0 to 7.13.3 that has developed this issue,

I havenā€™t noticed it on other 7.13.3 instances I maintain (They all have this problem).
If I find anything out of the ordinary. Iā€™ll let you know.

I am able to save values to due date if using the quick edit feature from the detail view.

Tested a fix from GitHub and works again