in drupal core node_save, when saving a node to the DB, the first thing that is done is to check for any fields that weren't posted (as a result of other module interference via form_alter), and replace any of those fields with whatever value was in the previous revision of the node

this pattern is not followed by cck because during node_save() -> node_submit() -> content_submit() -> _content_widget_invoke('process form values'), cck detects any fields that were missing in the node objects and fills those gaps in with widget-specific default starting data

the result of this, is that when using cck_field_perms or any other similar module, if you are currently in a node edit form as a user that is unable to see any select or multi-select fields, then your form submission will blow out those fields that you are unable to see.

the attached patch fixes this issue without breaking _content_widget_invoke in its many other uses

CommentFileSizeAuthor
content.module_18.patch696 bytesMrTaco

Comments

MrTaco’s picture

what can i do to help get this patch examined and committed?

harry slaughter’s picture

just ran into this same problem while using cck field perms.

true that if a user does not have edit access perms on a given field when he submits a node form, that field will be set to its default value rather than preserving the existing value as it should.

strange this hasn't gotten any love yet. are we the only ones using cck field perms?

harry slaughter’s picture

You may want to look at this patch: http://drupal.org/node/186914#comment-659964

I think this is truly more a problem with cck_field_perms

dopry’s picture

Status: Needs review » Closed (won't fix)

This won't get fixed for 4.7.