views:

157

answers:

1

Hey Guys,

I've been trying to write a CCK Field based on the Text field. But if I create a standard CCK Text field with only 1 value. Then edit a content item for this type, the values are never persisted. When I go back in and edit the same node, the value isn't there. I checked the database and its not in the table for the CCK node.

If I use more than one value it works fine.

I'm upto date on CCK (6.x-2.6) and CTools (6.x-1.5).

Has anyone seen this? and a possible solution?

+2  A: 

So I found the problem after a long debugging session. It turns out that there is a bug in the Embedded Media module. They had set not allowing nulls in the database table, but the module was passing nulls. Mysql didn't like this and was complaining about it, and didn't make any updates to that particular node. What made it worse was that I had the error messages turned off, so I wasn't seeing the errors.

The solution was to set the table to allow nulls, now its working fine.

Mark Milbourne
+1 for follow up on own question. BTW, even with error messages turned on, one should always check the webserver/php error logs at the beginning of a debugging session, as some redirects during form processing can result in an error not being displayed on screen.
Henrik Opel

related questions