Closed (fixed)
Project:
Node Comments
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2010 at 17:40 UTC
Updated:
2 Aug 2010 at 14:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
michelleConfirmed but this isn't an Advanced Forum issue. Moving to the Nodecomments queue.
Michelle
Comment #2
crea commentedConfirming.
Comment #3
crea commentedI'm afraid this is a consequence of fixing #737570: Node_save() of a node with node comments sets the node's commenting settings to 'disabled'. The whole "disable $node->comment setting but save it as $node->nodecomment" stuff is a dirty hack to make Node Comments compatible with core Comment module. We can't revert #737570: Node_save() of a node with node comments sets the node's commenting settings to 'disabled' - node_save() should not disable comment setting generally (it happens lot in contrib modules), so the only "proper" solution to this problem I see is to track $node->comment changes and replicate them to $node->nodecomment (which we don't do), then restore $node->nodecoment to $node->coment during nodeapi presave op (as we do already).
This means the first thing we need to add is tracking of comment setting change on the node form. We will need to repeat this for every module that changes $node->comment setting and which we want to be compatible with.
Comment #4
crea commentedWe could also use bigger numbers of $node->comment and get rid of $node->nodecomment completely. But it needs serious research on how would core and contrib modules react, and would this work at all.
Actually this seems to be most promising solition,but I don't have time for it, unfortunatly. Any volunteers ?Comment #5
crea commentedCleanest approach would be to isolate from $node->comment completely, rather than reuse it. That would mean using own table for $node->nodecomment setting and implementing separate node form element to control the setting. But it would require more work than the change described in #3.
Comment #6
crea commentedFortunatly we can detect if node was submitted via node form based on node object itself. So rather than track comment setting change, I simply not restore it when node is submitted via node form.
Please test this patch.
Comment #7
HuiJun-1 commentedThanks for the patch crea! It works perfectly so far.
Comment #8
crea commentedCommitted
Comment #9
michelleThanks, crea. Sorry I never got a chance to test. I've barely had any computer time lately. :(
Michelle