[development] cck not saving field values

Lee Rowlands rowlands at rowlands1.dnsalias.org
Fri Jul 16 01:21:13 UTC 2010


Had something similar with a node type defined via hook_node_info. Type
x was defined by module A but then module A was renamed to module B.
Had to update node_types table. If you used standard CCK ui to create
the node type then this is obviously not the issue.

On Thu, 2010-07-15 at 13:30 +0200, Ruben Caro wrote:

> 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.
> 
> Thanks.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100716/cd453417/attachment.html 


More information about the development mailing list