Needs review
Project:
Comment CCK
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2009 at 05:36 UTC
Updated:
16 Jan 2010 at 23:47 UTC
Jump to comment: Most recent file
Comments
Comment #1
Azol commentedDo you have "CCK Fieldgroup" module enabled?
Comment #2
obrienmd commentedI've tried both with it enabled and disabled.
Comment #3
Azol commentedCould you also check system log of your Drupal website for possible errors?
And you'd better keep CCK Fieldgroup enabled while testing, because of #669954: "Argument #2 is not an array" error
Comment #4
nachinius commentedSince no info in mailcomment is made about the cck fields, they get deleted in the
node because comment_cck interprets that a deletion had occurred.
Mailcomment don't make any assertion about cck fields, and they pass a comment
with uninitialized cck fields. Comment_cck merges this uninitialized cck-fields against the real node with array_merge.
From http://ar2.php.net/manual/en/function.array-merge.php
The keys here are set, however the values are uninitialized. In consequence, the cck-fields in the node are overwritten with bad values. Therefore,
they get erased from the node.
I changed that line to use a different kind of merging, one that don't delete the original node cck field value if
the new value isn't set (even though the key exists).
Find the patch attached.
This fix was sponsored by obrienmd.