I could have sworn I'd seen this discussed once before on the forums, but I'll be darned if I can find the thread ... so I apologize if this is a re-post.

I'm running Apache 2, PHP 5.1.4, and MySQL 5.0.27 on Windows XP.

I am trying to create a new node type using CCK. The type gets created (I can create the type, edit the title), but when I attempt to add a field, I get this error:

user warning: BLOB/TEXT column 'field_management_url_attributes' can't have a default value query: ALTER TABLE node_content_infrastructure_device ADD COLUMN field_management_url_attributes mediumtext NOT NULL default '' in database.mysql.inc on line 121.

If this has been seen before, can someone points me to a resolution?

Thanks

Comments

karens’s picture

It looks like you were trying to add a link field. You should go to the link project issues page and see if there is an answer or report the error there. That project is at http://www.drupal.org/project/link.

timatlee’s picture

I seem to be having the same issue when I try to add a text box, but an integer, decimal or user reference doesn't seem to create the same error.

Not really sure where to progress with this, as it doesn't seem to be specifically with the Link module?

timatlee’s picture

So it seems that its a PEBKAC issue ...

I had re-installed my PC due to a hardware change.. reinstalled MySQL, and then reloaded the tables.. then tried playing with CCK / Link.

What I didn't notice was that I left the "Strict Mode" enabled when I was setting up MySQL - this seems to cause the problem.

Re-install MySQL without Strict Mode enabled, and all was good.

I'm sure there was an easier way than reinstalling, but I'm not that familiar with MySQL to know it, so...

Thanks :)

verbal’s picture

Was anyone able to figure it out without having to reinstall MySQL? Like how to turn off strict mode on the db??

timatlee’s picture

There's a few notes about it on MySQLs site ... depending what version you're using. Google "mysql disable strict mode" ... should find something pretty quickly.

natalief’s picture

Hello,
I was having a similar issue when I tried to install Drupal with MySQL 5.0.27. I found a patch (http://drupal.org/node/54702) to fix that issue.

Then I installed CCK and am having the same issue as you are.
MySQL 5 does not support default values on text and blob fields, which is why these problems are happening.

I would like to fix this without turning off strict mode, but am new to Drupal and I am finding it diffacult to go through the files to find where to fix. I am a bit aprehensive to do this anyways.

I imagine, though, that I will keep running into this problem and there will not always be a patch for the code, CCK being an example.

Does anyone know what risks are involved with turning off Strict mode?

I have submitted a request for support at: http://drupal.org/node/106662

Thanks,
Natalie