Solonik77 / digitalus-cms

Automatically exported from code.google.com/p/digitalus-cms
0 stars 0 forks source link

cannot create page without publishing it first #136

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Fresh install of Digitalus from svn. 
2. Go to pages and create new, without publishing it instantly
3. or go to modules->blog->create blog

What is the expected output? What do you see instead?
Expected output is successfully created message. Instead of this, there is 
a SQL error:
Fatal error: Uncaught exception 'PDOException' with message 
'SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'NULL' for 
column 'publish_date' at row 1'

What version of the product are you using? On what operating system?
svn / trunk

Please provide any additional information below.
This is caused by the 'NULL' string set in Model_Page at line 96:
$publishDate  = 'NULL';
changing it to 
$publishDate  = null;

seems to resolve the issue.

Original issue reported on code.google.com by Darha...@gmail.com on 27 Feb 2010 at 1:25

GoogleCodeExporter commented 8 years ago
Cannot reproduce this behaviour!

What operating system, database, etc. are You using

Original comment by lowtower1974@gmail.com on 8 Mar 2010 at 7:35

GoogleCodeExporter commented 8 years ago
The line in question is 146 in r703
Operating system is Windows 7, database is MySQL 5.1.44 in strict mode 
(probably if not 
in strict mode, it just cast the string to integer, resulting in 0 for 
publishDate)

Original comment by Darha...@gmail.com on 8 Mar 2010 at 9:30

GoogleCodeExporter commented 8 years ago

Original comment by lowtower1974@gmail.com on 28 Apr 2010 at 4:05