In function comment_save(), when creating a new comment there's a call to db_ignore_slave(), but there's nothing like that when just updating the comment.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AnalogFile’s picture

Assigned: AnalogFile » Unassigned
Status: Needs work » Needs review
FileSize
758 bytes

And the patch.

There's no testing and no current way to test this at the moment. See http://drupal.org/node/808560#comment-3681926

moshe weitzman’s picture

Status: Needs review » Needs work

Looks good. Should say comment instead of node at '// saved node to be propagated to the slave.'.

AnalogFile’s picture

I took the call and the comment from the other leg of the 'if' which is also part of the comment (it's creating a new comment instead of saving an existing one).

I'm not that familiar with Drupal internals. Since that comment says 'node' I assumed that when creating/saving a comment we were really within a "wider" operation related to the node.

So there are three possibilities:
1) we are always within a wider operation, and both comments are correct (as well as the patch in #1)
2) we are within a wider node-level save operation when we create the comment, but not when saving it. In this case #2 is correct and the patch in #1 should be changed to say "comment" instead of node.
3) both creation and deletion of a comment is, generally, done independently from the node. In this case not only the comment introduced in patch #1 is to be changed, but also the comment in the other leg of the 'if'.

I do not know which is of those three. I may come back to this when I understand Drupal internals better. But if someone else knows already, go ahead and either mark this RTBC or post the correct patch.

moshe weitzman’s picture

3) is correct. nice analysis. hope someone can re-roll accordingly.

AnalogFile’s picture

Status: Needs work » Needs review
FileSize
1.1 KB

easy

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

thx

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.