Jump to content
  • 0

successfully added message, but no data inserted in databse


Question

Posted

today we have found that one of our custom plugin have a strange behavior in v4 . after adding a item, the successfully message appear but no data inserted in database !  , when we left some empty fields it return the error validation for that fields; so the validation pass without any issue, after a search in the forum the same behavior was reported in support manager pro in v4 also, no change made in database.

i was thinking what will be the cause for this behavior ?as no error returned from the Record components or the Input components .

i have added the begin() commit() rollback() fucntion to see what happen but no result, also the error_reporting and the debugger is not catching any error !!!

any idea how to diagnostics the problem ?

Recommended Posts

  • 0
Posted
  On 4/25/2017 at 2:29 PM, Adam said:

Thats because all the core code uses the dateToUtc function:

http://source-docs.blesta.com/class-AppModel.html#_dateToUtc
 

 

The function basically converts:

2017-04-25T14:43:00+00:00

which as you know is ISO 8601 format (date('c')) to something MySQL understands as explained in their documentation:

2017-04-25 14:43:00

-Adam

Expand  

I Have opened one file of support manager , and i found they use date('c') in var injected in database.

  • 0
Posted

Don't directly insert a date using date('c'). That includes timezone information and is not formatted the same as the field is expecting. Save a UTC date in the format YYYY-MM-DD HH:MM:SS.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...