Reviewed & tested by the community
Project:
Content Construction Kit (CCK)
Version:
6.x-3.x-dev
Component:
General
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 May 2011 at 01:29 UTC
Updated:
31 Jul 2014 at 19:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mikeytown2 commentedpatch also fixes some white space issues.
Comment #2
dsayswhat commentedThat call to isset() fails when the value of a field is set to null.
When you empty a textarea, and click submit, of that textfield on the form, $node->{$field_name}[0][$column], it comes in on the form as an empty string.
However, CCK sets those fields to null during the call to 'content_set_empty' in content.module:726 (or thereabouts).
Setting those fields to null trips 'isset', and we end up not being able to save fields that have legitimate empty values anymore. You can edit your textfield, but not empty it.
Therefore, we probably need to explicitly test using is_null(), to allow for fields that are present but empty.
I've attached a patch modified to include an is_null test...I don't know if there's any wider-ranging implications here that might cause further bugs, but it allows me to clear fields and successfully save them.
Comment #3
mikeytown2 commentedWhat about something like this.
Comment #4
adammaloneOld issue but I just stumbled upon it and #3 seems to fix the issue. Might as well mark as RTBC for D6 sites still out there with this issue.