I have the following =>
Drupal 5.0-RC-1
Configuration file Protected
Cron maintenance tasks Last run 2 hours 30 min ago
You can run cron manually.
Database schema Up to date
File system Writable (private download method)
GD library bundled (2.0.28 compatible)
MySQL database 5.0.22
PHP 5.2.0
Unicode library PHP Mbstring Extension
Web server Apache/2.2.3 (Win32) mod_ssl/2.2.3 OpenSSL/0.9.8d mod_auth_sspi/1.0.4 PHP/5.2.0
My testing for porting my 4.7.3 site to 5.0 (when it is released) has been going well, but, I have just enabled "Create New Revision" for the Page content type, and now I get this PHP error whenever I try to submit an existing edited Page.
The error is =>
Field 'log' doesn't have a default value query: INSERT INTO node_revisions (nid, vid, title, body, teaser, timestamp, uid, format) VALUES (113, 116, 'Revision Test 1', 'Testing revisions 1\r\nI have added a new line.', 'Testing revisions 1\r\nI have added a new line.', 1168029617, 1, 2) in D:\Web-AMP\Apache2\htdocs\drupalv5\includes\database.mysql.inc on line 167.
Now whenever I try to view that node it just displays the original "Welcome to your new Drupal website!" page.
I have disabled the "Create New Revision" for the Page content type, and have tried to delete the relevant node, but to no avail.
I have tried to search for an answer, but I have had no success.
I can restore from my backup, but I will leave it for a while just incase you need any further info.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | node_module_head_1.patch | 846 bytes | larrychu |
| #11 | node_module_51.patch | 632 bytes | larrychu |
| #10 | node_module_head.patch | 621 bytes | larrychu |
Comments
Comment #1
m3avrck commentedI cannot reproduce this on the last 5.x build.
Comment #2
RobRoy commentedLooks like the MySQL STRICT mode bug which has been fixed in the 5.x-dev version. Please test with that version or wait for the next release.
Comment #3
spjsche commentedThanks for the response, I will download the dev version and reply accordingly.
Comment #4
spjsche commentedJust installed a vanilla version of the 5.x Dev release.
All goes well, until I try to enable the locale, search, throttle and upload modules, I proceed to do an update.php from the modules page, and I get the following error displayed.
An HTTP error 401 occured. update.php?op=do_update.
and the logs report =>
reset() [function.reset]: Passed variable is not an array or object in D:\Web-AMP\Apache2\htdocs\drupalv5\update.php on line 521.
This has never happened before now.
Comment #5
spjsche commentedI have just reverted to 5.x rc1, and the above does not happen.
Comment #6
spjsche commentedSorry, I was not explicit enough.
By above, I mean.
An HTTP error 401 occured. update.php?op=do_update.
and the logs report =>
reset() [function.reset]: Passed variable is not an array or object in D:\Web-AMP\Apache2\htdocs\drupalv5\update.php on line 521.
Comment #7
larrychu commentedI'm getting this error on a clean drupal 5.1 install with:
Apache 2.2
PHP 5.2
MySQL 5.0.27
Details of the message:
Steps to reproduce:
-Install drupal 5.1, create database, configure drupal, create user #1
-Create a page, check the "create new revision" checkbox before submitting
-Edit the page, check the "create new revision" checkbox before submitting
-Error appears, page is gone.
The log column is conspicuously missing from the insert statement, and does not have a default value (in the create table statement).
Comment #8
larrychu commentedThis is happening on 5.1.
Comment #9
larrychu commentedAll this is caused by the update to {node} table vid column and a failed insert of corresponding {node_revision} row.
Since the log column does not have a default value, it should always be inserted during an insert.
in node.module:
When $node->log is empty, the $revisions_table_types['log'] will never get a value, thus it will never get inserted. I think you need to write a value all the time so it should have additional logic in an else block like this:
I tested this with a page node.
Comment #10
larrychu commentedHere is the patch against head. I'm not actually able to confirm whether it works in head which is why I will also attach a patch against 5.1 after this.
Comment #11
larrychu commentedHere is the patch against 5.1
Comment #12
larrychu commentedSorry, my previous patch wasn't from root. Here is a patch from root against HEAD.
Comment #13
drummCan we remove the if statement and always do
and modify the comment. It seems like an irrelevant holdover from before we refactored the revisions system.
Comment #14
terrencewood commentedWhy not just modify the node_revisions table to accept null values for the log column?
Comment #15
lias commentedShould I apply this patch to my 5.1 version? It's still coming up as an issue using Firefox and IE.
Comment #16
gpk commentedI think this was fixed long ago in 5.2 or 5.3 or some other 5.x release back in 2007. Shouldn't be a problem now.