Hi,

On my test website with the talk module, each time I'm using duration for automatic selection of a best answer the system closed the comments for the current question.

The side effect of this behaviour when using the talk module is that the talk comment page is no more accessible and no one can see the discussion nor add a new comment.

Is this behaviour by design or is there something I'm missing? Instead of "closing" the comments, I would prefer either leaving them open or only locked.

Thanks.

CommentFileSizeAuthor
#8 1785432-5-talk-03.patch915 bytesec
#6 1785432-5-talk-02.patch968 bytesec
#5 1785432-5-talk.patch825 bytesjcisio

Comments

jcisio’s picture

The module itself does not close the comment. Can you test it on a clean install?

ec’s picture

Yes and I will report back here. Regards.

ec’s picture

Hi,
After testing the last version of the 6.x module on a fresh install, it is obvious that the issue I mentionned previously has nothing to do with this module. In fact it appears to be a side effect of the Talk module which I'm using and more precisely the talk_nodeapi() function of this module.
I will open a new issue there and I will report back here.
Best,

ec’s picture

I think that we should add a statement somewhere in the README or the module's homepage about this issue. Something like this:

Known incompatibility:
Question/answer module works well this the talk module except when it uses the duration feature. In this specific case when a best answer is automatically selected and the page is reloaded the talk module will close the comments which will make the talk page unavailable. The workaround for this is to edit the question and open the comment.

jcisio’s picture

Status: Active » Needs review
StatusFileSize
new825 bytes

We should fix the bug. Here is a patch. I didn't test as I don't have Talk module installed. Could you test it (for both 6.x and 7.x) so that I can go ahead and commit?

ec’s picture

StatusFileSize
new968 bytes

Thanks for this patch. In fact it looks like that the talk module closes the comment after saving the node. Hence we need to save it a second time. Here is a patch that works for me on 6.x I don't have a 7.x install.

jcisio’s picture

That means patch in #5 did not work? It's weird, because what I read in the Talk's code (latest dev), it does not save node, it just modifies the value on node_load. So patch in #5 restores the value before saving a node. So I don't see the logic in the second patch.

ec’s picture

StatusFileSize
new915 bytes

Sorry, you're right! I may I have done something wrong the first time I tried your patch in #5. I applied it again and it works fine. So here it is again with a test to see if the talk module is activated.

jcisio’s picture

We don't need to check if Talk is enabled. Any module can modify $node->comment and store the original value in $node->comment_original_value. So it'd better support all those modules ;)

And could you check it against 7.x versions so that we can keep both branch synched?

jcisio’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Fixed

I checked the Talk module and committed to both 6.x and 7.x branches.

Status: Fixed » Closed (fixed)

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