Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Incorrect datetime value
This discussion is related to the Yet Another Gamification Application addon.
Ok, so my host changed the "infrastructure" last night and reactions suddenly stopped working ever since.
Anyone seen this before?
When trying to react to a post now I get:
Incorrect datetime value: '2019-06-03T08:25:09+0000' for column `pmono_no`.`v2018_Reaction`.`DateInserted` at row 1|Gdn_Database|Query|insert `v2018_Reaction` (`ActionID`, `ParentID`, `ParentType`, `ParentAuthorID`, `InsertUserID`, `DateInserted`) values (:ActionID, :ParentID, :ParentType, :ParentAuthorID, :InsertUserID, :DateInserted)
Yes! I have the exact same problem on Vanilla Forums V2.6 running PHP 7.3 on Reclaim Hosting. I get a very similar error message as soon as I enable YAGA:
[02-Jun-2019 20:44:19 UTC] PHP Fatal error: Incorrect datetime value: '2019-06-02T20:44:19+0000' for column `marksmat_vf4`.`GDN_BadgeAward`.`DateInserted` at row 1|Gdn_Database|Query|insert GDN_BadgeAward (`BadgeID`, `UserID`, `InsertUserID`, `Reason`, `DateInserted`) values (:BadgeID, :UserID, :InsertUserID, :Reason, :DateInserted) in /home/marksmat/public_html/classes/Summer2019Stat185/StatForum/library/database/class.database.php on line 421
Can you provide more information on that error? Maybe after adding
$Configuration['Garden']['Debug'] = true; to your config, it will show the sql that has been built and in which file. Or maybe you can provide the config trail so that I can see which file and maybe even what code is causing the problem (the path to the file must be inside the YAGA application)
$Configuration['Garden']['Debug'] = true. does not seem change the error as reported in my error log in any way. I'm not sure what you mean by the "config trail". Thanks, though!
I meant the debug trail, sorry. You have pasted this line:
in /home/marksmat/public_html/classes/Summer2019Stat185/StatForum/library/database/class.database.php on line 421
I have hoped that there are more filenames below that visible. The first file which is inside the path of the yaga application is the one that creates this sql and we need to look at that file to find out what exactly is causing the error. It would make it much more easy, at least.
The other approach means more research work, but it also needs more details from your side: you need to tell me exactly at which page and at which place the error occurs. If anyone of you can post a link to your forum, that would be best.
@R_J Here is a link to my forum: https://www.marksmath.org/classes/Summer2019Stat185/StatForum/
It's working right now. If I enable the YAGA application, it will just show the something went wrong screen shown below. I'm sure that's not enough information for you but I'm not sure what else you need. Thanks again!
$Configuration ['Debug'] = true;to your config and try again. That will give explanations what exactly has gone wrong.
OK, Debug is now on and YAGA reinstalled. You can have a look, if you like. For the record, I get a trace that looks like so:
Incorrect datetime value: '2019-06-05T10:07:08+0000' for column `marksmat_vf4`.`GDN_BadgeAward`.`DateInserted` at row 1
(`BadgeID`, `UserID`, `InsertUserID`, `Reason`, `DateInserted`)
values (:BadgeID, :UserID, :InsertUserID, :Reason, :DateInserted)The error occurred on or near: /home/marksmat/public_html/classes/Summer2019Stat185/StatForum/library/database/class.database.php
Variables in local scope:
I notice that you have to be logged in to trigger the fatal error. The error occurs as soon as anyone logs in.
Thanks for the details!
/applications/yaga/models/class.badgeawardmodel.phpand exchange line 73 which looks like this:
By searching the code for more occurances of that problematic code, i would advice to also make the following changes:
Line 188 in
and line 206 in the same file from
That should solve those date problems
@R_J Yes, that seems to have done the trick - thanks!!