Menu
Welcome, Guest
Username: Password: Remember me

TOPIC: Fatal error on every Date fields with inline edit.

Fatal error on every Date fields with inline edit. 5 months 2 weeks ago #78660

  • holdusback
  • holdusback's Avatar
  • Offline
  • Premium Member
  • Posts: 153
  • Thank you received: 8
  • Karma: 0
After trying to find something on Google I post it here :

Just note before, it happen ONLY on date, on date time it work perfectly !

When I edit in-line a date, when I push enter or click on the small confirm icon I got this instead of the date value :
Fatal error:  Uncaught Error: Call to a member function format() on boolean in /XXXX/SuiteCRM/include/InlineEditing/InlineEditing.php:445
Stack trace:
#0 /XXXX/SuiteCRM/include/InlineEditing/InlineEditing.php(392): formatDisplayValue(Object(AOS_Contracts), '28/04/2019 00:0...', Array, 'save')
#1 /XXXX/SuiteCRM/include/InlineEditing/InlineEditing.php(370): getDisplayValue(Object(AOS_Contracts), 'start_date')
#2 /XXXX/SuiteCRM/modules/Home/controller.php(64): saveField('start_date', '7ede7c39-69a3-3...', 'AOS_Contracts', '28/04/2019', 'DetailView')
#3 /XXXX/SuiteCRM/include/MVC/Controller/SugarController.php(523): HomeController->action_saveHTMLField()
#4 /XXXX/SuiteCRM/include/MVC/Controller/SugarController.php(491): SugarController->do_action()
#5 /XXXX/SuiteCRM/include/MVC/Controller/SugarController.php(465): SugarController->handle_action()
#6 /home in /XXXX/SuiteCRM/include/InlineEditing/InlineEditing.php on line 445

Tried on a custom module, a normal module with custom fields, and a normal module without any custom thing (like module I dont use, here contract.)

I Have to refresh to get, sometime the old value, sometime the new value.


PS : Find out that it bug on the demo too : demo.suiteondemand.com

They just disable php error, so the field become blank, but it dont work too.
Last Edit: 5 months 2 weeks ago by holdusback.
The administrator has disabled public write access.

Fatal error on every Date fields with inline edit. 5 months 3 days ago #79143

  • medipharma
  • medipharma's Avatar
  • Offline
  • Junior Member
  • Posts: 32
  • Thank you received: 4
  • Karma: 0
Same here... I didnt notice this thread so I started up my own...

suitecrm.com/suitecrm/forum/suitecrm-7-0...ient-list-view#79121
The administrator has disabled public write access.

Fatal error on every Date fields with inline edit. 5 months 3 days ago #79144

  • medipharma
  • medipharma's Avatar
  • Offline
  • Junior Member
  • Posts: 32
  • Thank you received: 4
  • Karma: 0
I must say its a pretty nasty bug and kind of unexpected to be in such a system...
The administrator has disabled public write access.

Fatal error on every Date fields with inline edit. 5 months 3 days ago #79145

  • holdusback
  • holdusback's Avatar
  • Offline
  • Premium Member
  • Posts: 153
  • Thank you received: 8
  • Karma: 0
If it happen to everyone, this maybe is know by the devs, we have to push the info on github
The administrator has disabled public write access.

Fatal error on every Date fields with inline edit. 5 months 3 days ago #79146

  • medipharma
  • medipharma's Avatar
  • Offline
  • Junior Member
  • Posts: 32
  • Thank you received: 4
  • Karma: 0
I just posted an issue on github:

github.com/salesagility/SuiteCRM/issues/7067
The administrator has disabled public write access.
The following user(s) said Thank You: Dillon-Brown, holdusback

Fatal error on every Date fields with inline edit. 5 months 3 days ago #79154

  • Dillon-Brown
  • Dillon-Brown's Avatar
  • Offline
  • Administrator
  • Posts: 214
  • Thank you received: 76
  • Karma: 17
Thanks guys, I've created a fix here: #7072.
Last Edit: 5 months 3 days ago by Dillon-Brown.
The administrator has disabled public write access.
The following user(s) said Thank You: holdusback, medipharma

Fatal error on every Date fields with inline edit. 5 months 3 days ago #79158

  • medipharma
  • medipharma's Avatar
  • Offline
  • Junior Member
  • Posts: 32
  • Thank you received: 4
  • Karma: 0
Wonderful, thank you!!! It works as expected.
The administrator has disabled public write access.

Fatal error on every Date fields with inline edit. 5 months 3 days ago #79160

  • holdusback
  • holdusback's Avatar
  • Offline
  • Premium Member
  • Posts: 153
  • Thank you received: 8
  • Karma: 0
Thanks a lot for your reactivity !

Btw, do you know if on github I can ask a tech-question ? I've asked it here on the forum but I got no answer. I want some pro feedback before coding anything.
The administrator has disabled public write access.

Fatal error on every Date fields with inline edit. 5 months 3 days ago #79170

  • Dillon-Brown
  • Dillon-Brown's Avatar
  • Offline
  • Administrator
  • Posts: 214
  • Thank you received: 76
  • Karma: 17
@holdusback, I guess it would depend on the question but you might just get asked to move it to the forums. We do also have a Gitter channel that developers regularly talk in which might be more suited.
The administrator has disabled public write access.
The following user(s) said Thank You: holdusback

Fatal error on every Date fields with inline edit. 4 months 1 week ago #80292

  • loba85
  • loba85's Avatar
  • Offline
  • New Member
  • Posts: 13
  • Thank you received: 1
  • Karma: -1
That hotfix doesn't work for me. strtotime($value) function (line 428) return false if $values has the "d/m/Y" format. I made these changes to make it work:
if ($vardef['type'] === 'date') {
            // $value = date('Y-m-d', strtotime($value));
            $date_format = $timedate->get_date_format(); //added

            $value .= ' 00:00:00';

            // $datetime = DateTime::createFromFormat('Y-m-d H:i:s', $value, new DateTimeZone('UTC'));
            $datetime = DateTime::createFromFormat($date_format . ' H:i:s', $value, new DateTimeZone('UTC')); //added
        }

Bye
Loba
The administrator has disabled public write access.
Time to create page: 0.066 seconds
Powered by Kunena Forum