Fivestar module overrides the #form_id and #form_token when previewing a reply to a comment, thereby giving this error "The form has become outdated. Copy any unsaved work in the form below and then reload this page." which wouldn't allow you to save a response to a comment.

Steps to reproduce:
1. Download and install a vanilla version of Drupal 7.10.
2. Install and enable the Fivestar module. Note: You'll have to install and enable the voting api module which five star depends on too.
3. Add a fivestar rating field to the Comment field of the 'Article' content type(admin/structure/types/manage/article/comment/fields).
4. Select the widget: 'Stars(rated while viewing)' and Save.
5. Now go to any test content you've created. Try adding a comment on the node, but this time instead of clicking on 'Save', click on 'Preview'.
6. When the comment preview page is shown, then click on 'Save'.
7. You're greeted with the error message 'The form has become outdated. Copy any unsaved work in the form below and then reload this page.'

This bug occurs on any content type that has a fivestar rating field attached to it's comment. It was first noticed on the 'forum topic' content type.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sloame’s picture

Attached is a proposed patch that works for me.

firebird’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, fivestar-fivestar_conflicts_with_comment_form-1370526-1.patch, failed testing.

sloame’s picture

sloame’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, fivestar-fivestar_conflicts_with_comment_form-1370526-4.patch, failed testing.

sloame’s picture

Status: Needs work » Needs review
FileSize
1.67 KB

One more try again

Status: Needs review » Needs work

The last submitted patch, fivestar-fivestar_conflicts_with_comment_form-1370526-7.patch, failed testing.

sloame’s picture

Following test failures on this thread: http://drupal.org/node/698932#comment-5389728

ericduran’s picture

Hmm, I think I'm just going to make my own subclass to base the test off, that way we can pass in d.o.

ericduran’s picture

Sorry for the late reply, I've been on vacation :)

Anyways here's the issue #1392884: Implement FivestarBaseTestCase We can make it work for now, instead of having d.o. skip our test, I rather it actually runs our test.

I'll try to talk to @rfay about this when I get a chance.

Louis Bob’s picture

Still got this conflict problem.

I don't understand the status of this issue ?

dwhutton’s picture

I have the same or a similar problem. When a comment is submitted after performing a preview, nothing is saved and there is a message to the effect that the Fivestar rating has been cleared. Saving the comment without first performing a preview works normally. This is for an authenticated user with the appropriate permissions. Using Fivestar 7.x-2.0-alpha2

I haven't tried the patch yet, to see if this fixes the problem.

suzanne.aldrich’s picture

My users were losing their comments after I installed this module. They were getting a timeout error when they replied, and no amount of reloading the page would restore their data. I applied the patch in #7 and all was well.

Seriously, what is holding up this patch? Doesn't it qualify as a critical bug when users are losing their input? As far as my users are concerned, this bug was critical.

I would say, override the stupid unit testing stuff and apply this patch.

suzanne.aldrich’s picture

Version: 7.x-2.0-alpha1 » 7.x-2.0-alpha2
dwhutton’s picture

Patch #7 did not work for me. When saving after a preview I get the message 'thank you for your vote' and the comment is not saved.

mikhailian’s picture

Patch #7 worked for me. Kudos to the author!

Fidelix’s picture

I am having serious troubles with this bug, so this is very welcome.

I will test the patch and report back.

Fidelix’s picture

Tested patch #7. Worked. Awesome. Thanks!

Fidelix’s picture

Priority: Normal » Major
Status: Needs work » Needs review
xandeadx’s picture

#1, #4, #7 - not work
Fivestar 7.x-2.x-dev

http://drupal.org/node/1289832#comment-5634542 - work

hefox’s picture

Status: Needs review » Closed (duplicate)
gawrion’s picture

Hey - i have the same problem. With alpha and dev version its the same. When trying to submit previewed comment i go "Thank You for Your vote"...

Are U working on it? Maybe somewhere is a solution for that critical bug?