Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
line 1060 of cck/content.module
Comment | File | Size | Author |
---|---|---|---|
#3 | cck-1156096-3.patch | 2.63 KB | mikeytown2 |
#2 | cck-1156096-2.patch | 2.64 KB | dsayswhat |
#1 | cck-1156096-1.patch | 2.54 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedpatch also fixes some white space issues.
Comment #2
dsayswhat CreditAttribution: 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 CreditAttribution: 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.