[development] cck not saving field values

Ruben Caro ruben.caro at escoltesiguies.cat
Thu Jul 15 11:30:55 UTC 2010

I'm having troubles creating cck nodes in drupal. I created a cck node 
type with several fields, none of them marked as mandatory.

Now, apparently for no reason, after I create a new node of this type, 
none of the cck fields holds its value. The process is:
1- I submit the creation form (node/add/..) with valid values.
2- Drupal shows me the node page (node/1234) only with my non-cck data 
(title, body, etc.).

If I edit the node, then the new values are saved (and displayed).
If I try node_load, no cck fields are filled in with data, and if I 
search directly on the database, there are no cck data related to this node.
If I take a look at the $node on hook_nodeapi when $op is 'insert', and 
it shows perfect, with all cck fields as I filled in on the form.
If I call cache_clear_all() inside hook_nodeapi when $op is 'insert', 
nothing changes, and the node ends up void again.
But if I clear the cache the 'Devel' way (clear css cache and then clear 
each cache table) inside hook_nodeapi when $op is 'insert', the cck data 
of the node magically shows up on the node page, and is not lost when I 
call node_load or watch in the database.

Somehow, this didn't happen the day before, with no changes to the code 
and no changes to the content. It just started to happen now, and only 
with this node type.

I plan to go further with this, but I have no time now. I just feel 
lucky and try this mailing list to see if anyone has a clue for me.


<http://www.escoltesiguies.cat>*Rubén Caro - Tècnic Informàtic *
*Servei d'Informàtica*

*Minyons Escoltes i Guies de Catalunya (MEG)*
*Telèfon:* 93 590 27 00
*Fax:* 93 590 04 92

No m'imprimeixis si no és necessari. Protegim el medi ambient.

More information about the development mailing list