When using nodechanges_body to override the comment body, the comment is not created if there are no other changes due to me forgetting to update the if().

CommentFileSizeAuthor
nodechanges-fix-body-only.patch504 bytesbdragon

Comments

dww’s picture

Ran into a similar bug at #1733658: Inject a comment body text area and input format selector into the node edit form. The fix looks okay, although now I'm wondering if we can consolidate the nodechanges_body stuff into nodechanges_comment_body. Since that's where #1733658 puts itself, maybe the migrate stuff can just use that and we can rip out the custom nodechanges_body and nodechanges_body_format logic.

dww’s picture

Assigned: Unassigned » bdragon

Upon further thought -- why make a new node revision during migration in this case? If a comment is just a comment, with no other issue property changes, why don't we have the migration scripts just add a comment in that case, instead of going through the trouble of a no-op node_save() just to pass the comment body into comment_save() via nodechanges.module?

Maybe this should be "won't fix"... thoughts?

Thanks,
-Derek

bdragon’s picture

@dww: This is about creating comments during migration in response to existing node revisions.

dww’s picture

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

Based on an IRC chat, we don't need this after all. The migration code for issues and comments is bypassing node_save(), anyway. If someone else is trying to migrate something like this, and they just want to have a comment added with a body, they should use comment_save() not node_save().

Cheers,
-Derek