Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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:

  1. See docs.
  2. SQL mode is determined upon MySQL server’s startup and not changed for a single database.
  3. Try to locate MySQL’s configuration file my.ini or my.cnf. For XAMPP, this file would live somewhere around c:\xampp\myqsl\bin\.
  4. Disable STRICT_TRANS_TABLES by removing a line similar to sql_mode=STRICT_TRANS_TABLES from this file (you can prepend a # to change it into an inoperational comment)
  5. Stop and restart MySQL server
  6. 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

#15 2008-12-16 09:21:41

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Incorrect datetime value: '0' for column 'Expires' error in Txp 4.0.7

Offline

#16 2008-12-18 02:37:46

georgeM
Member
From: Toronto, Canada
Registered: 2006-02-27
Posts: 43
Website

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

#17 2008-12-19 12:51:22

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#20 2009-01-15 17:43:23

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

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

Board footer

Powered by FluxBB