As xtfer requested, I open a new issue for this problem.
Summary of the problem:
"When I updated to the 6.x-2.x branch, update.php threw some errors and the table 'ds_settings' hasn't been created :
User warning: BLOB/TEXT column 'settings' can't have a default value
User warning: BLOB/TEXT column 'fields' can't have a default value
This is a valid warning, as I found out in the MySQL documentation: " BLOB and TEXT columns cannot have DEFAULT values." (http://dev.mysql.com/doc/refman/5.5/en/blob.html)
I found it strange that this hasn't been spotted by more people, but I think it's only an issue if you set your MySQL database to be very strict with the input (sql_mode = 'STRICT_TRANS_TABLES'), which is the case in my institute on our innoDB MySQL databases."
It shouldn't affect most people, only the ones running MySQL in strict mode.
The fix is quite simple as it only involves removing 'default' => '', from the definitions of the 'settings' and 'fields' column in ds.install
I'll attach a patch in the next post.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | ds-remove_default_for_text_columns-1550654-5.patch | 1.43 KB | tlaurent |
| #3 | ds-remove_default_for_text_columns-1550654-3.patch | 1.18 KB | tlaurent |
| #2 | ds-remove_default_for_text_columns-1550654-2.patch | 902 bytes | tlaurent |
| #1 | ds-remove_default_for_text_columns-1550654-1.patch | 499 bytes | tlaurent |
Comments
Comment #1
tlaurent commentedThis should fix it for 6.x.2.x branch.
Comment #2
tlaurent commentedSorry, done a half-baked job with the previous patch: I forgot to remove 'default' in ds_update_6201 as well...
That's corrected in this new patch.
Comment #3
tlaurent commentedIn ds_update_4() the records are re-added to the table without anything for the 'fields' column, but this column doesn't accept NULL, so in this new patch I took that into account and added
$record->fields = '';to avoid the problem.But I'm not sure it's the right solution, or if 'fields' should accept NULL.
Comment #4
xtfer commentedThank you very much. I'll look at this as soon as possible.
Comment #5
tlaurent commentedI noticed that one last thing was upsetting MySQL strict: trying to create a table when it's already there. It throws an error and stops the Drupal update. GOD this thing is picky !!!
So, I re-rolled a new patch which checks if the table (ds_settings) is there before trying to create it, and drop it 1st if it's there.
After installing this final patch (this patch also include all the changes from the previous patches), everything seems to have been updated and no errors or warnings have been generated.
Comment #6
ThePhantom commentedWhen editing product fields in a catalog, upon saving you get the following error.
I solved the problem by allowing ´fields´ to be empty (NULL).
Please note that I don´t really know anything about Drupal or DS yet! Just wanted to give you a heads up!
Please update the issue with the correct fix so I can apply it. Thanks!
PS. I was able to install DS using your latest patch, thanks!
Comment #7
xtfer commentedThanks @ThePhantom.
Looks like we'll need to check all the write operations...
Comment #8
aspilicious commentedClosing all the drupal 6 issues as support for that version has been dropped.