Support » Plugins » [Plugin: W3 Total Cache] (maybe others) Invalid default value for 'date'

  • AutoDMC


    My MySQL5 Server runs in Traditional/Strict SQL-MODE, and therefore it does not like dates which are invalid.

    When attempting to activate W3 Total Cache, I get a complaint that it “can’t create table wp3_w3tc_cdn_queue: Invalid default value for ‘date'”

    The “default value” attempted is all-zeroes, which is invalid and out of range as far as Traditional/Strict SQL-MODE is concerned.

    The only “hacky fix” I’ve found is here which basically says “look for the invalid dates in the code and change them to something valid or remove them by hand.”

    That’s nice… until I update the plugin, or have to remove it and bring it back for any reason… it seems really duct-tapey to me.

    Is there a config file somewhere I can change to make WordPress default to a sane date (birthday of Von Neumann, or something), or not provide a default date? Or is this type of thing plugin-centric (I post it here in the plugins because of all the plugins I have so far, I’ve only had problems with this one)?

    I wish the solutions were better than “hack the code” or “make your server more lenient,” as I’ve got some development databases on the same server, and I’d rather they drop red flags if I do anything that even LOOKS bad before it’s too embedded to do it right 🙂

    Thanks for your time.

Viewing 1 replies (of 1 total)
  • I ran into this, I wrote a plugin for it.

    I agree, modifying the core code for this is completely wrong – I would recon that the changes advised there would cause additional problems. I believe the use of zero-dates was done in MySQL in lieu of NOW(), so it basically returns the current date. If you change it so that its not using NOW() or passing zero-dates, I think that would screw up everything from scheduling posts, or wp-cron, to even nonces (and thus permissions).

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: W3 Total Cache] (maybe others) Invalid default value for 'date'’ is closed to new replies.