Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2008-12-03 20:57:40
- rtd
- New Member
- From: Washington, DC
- Registered: 2008-12-03
- Posts: 3
Re: Incorrect datetime value: '0' for column 'Expires' error in Txp 4.0.7
Thanks wet. I can confirm that it fixes this specific error on my site.
Offline
#14 2008-12-16 09:20:30
- hongster
- New Member
- Registered: 2008-12-01
- Posts: 7
Re: Incorrect datetime value: '0' for column 'Expires' error in Txp 4.0.7
wet wrote:
- See docs.
- SQL mode is determined upon MySQL server’s startup and not changed for a single database.
- Try to locate MySQL’s configuration file
my.ini
ormy.cnf
. For XAMPP, this file would live somewhere aroundc:\xampp\myqsl\bin\
.- Disable
STRICT_TRANS_TABLES
by removing a line similar tosql_mode=STRICT_TRANS_TABLES
from this file (you can prepend a#
to change it into an inoperational comment)- Stop and restart MySQL server
- Report back
Hi, thank for the instructions. I have a question in mind… Shouldn’t TXP handle such error? The error lies in in the SQL statement. When the date fields are empty, a ‘0’ is inserted into the SQL statement. It caused MySQL to complaint. I think this error should be handled by TXP. Telling MySQL to ignore errors by changing the sql_mode might not be such a good idea.
Offline
Re: Incorrect datetime value: '0' for column 'Expires' error in Txp 4.0.7
Offline
Re: Incorrect datetime value: '0' for column 'Expires' error in Txp 4.0.7
I can confirm that the plugin solution works great in the meantime until 4.0.8 is released (noticed you fixed it in the latest build too wet). Once it is packaged in an official update, will having the plugin activated while upgrading cause any errors? I suppose it would be best to disable the plugin, upgrade, then check, and finally delete the plugin if everything is good.
Thanks for the quick fix!
Offline
Re: Incorrect datetime value: '0' for column 'Expires' error in Txp 4.0.7
The update scripts run before the plugins are loaded. So a plugin cannot affect the upgrade.
Offline
#18 2009-01-15 17:29:41
- zeusdidit
- Member
- Registered: 2007-10-16
- Posts: 111
Re: Incorrect datetime value: '0' for column 'Expires' error in Txp 4.0.7
Wet… Was that fix added to the Textpattern download so I can just re-download them?
Offline
#19 2009-01-15 17:41:06
- zeusdidit
- Member
- Registered: 2007-10-16
- Posts: 111
Re: Incorrect datetime value: '0' for column 'Expires' error in Txp 4.0.7
Also, Wet, thanks for the fix. I just implemented it and it’s working correctly again.
Offline
Re: Incorrect datetime value: '0' for column 'Expires' error in Txp 4.0.7
zeusdidit wrote:
Wet… Was that fix added to the Textpattern download so I can just re-download them?
The defect will be fixed in Textpattern 4.0.8.
Offline