We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2214
    • 33 Posts
    Windows 2003 box running PHP 5.2.10/mySQL 5.0.51a

    When creating a new document and attempting to save, I get this:

    « MODx Parse Error »
    
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Incorrect integer value: '' for column 'pub_date' at row 1 »
          SQL: INSERT INTO `modx`.`modx_site_content` (introtext,content, pagetitle, longtitle, type, description, alias, link_attributes, isfolder, richtext, published, parent, template, menuindex, searchable, cacheable, createdby, createdon, editedby, editedon, publishedby, publishedon, pub_date, unpub_date, contentType, content_dispo, donthit, menutitle, hidemenu) VALUES('','
    Blah blah
    
    ', 'Test by Aaron', 'Test', 'document', '', 'test', '', '0', '1', '1', '1', '3', '1', '1', '1', '1', 1285795311, '1', 1285795311, 1, 1285795311, '', '0', 'text/html', '0', '0', '', '0') 
          [Copy SQL to ClipBoard]
     
    Parser timing
      MySQL:	0.0041 s	(1 Requests)
      PHP:	1285795311.1425 s	 
      Total:	1285795311.1466 s	 


    If I clear the Publish Date field, it publishes just fine.
      • 2214
      • 33 Posts
      So interesting -- the default Publish date, that is added when I create a new resource, uses dashes instead of slashes for the date configuration.

      05-09-2012 16:03:38


      If I change it to
      05/09/2012 16:03:38


      everything works fine.

      The question, then, is how to get the default dates to be in the correct format?