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.
Comments
Comment #1
sloame CreditAttribution: sloame commentedAttached is a proposed patch that works for me.
Comment #2
firebird CreditAttribution: firebird commentedComment #4
sloame CreditAttribution: sloame commentedComment #5
sloame CreditAttribution: sloame commentedComment #7
sloame CreditAttribution: sloame commentedOne more try again
Comment #9
sloame CreditAttribution: sloame commentedFollowing test failures on this thread: http://drupal.org/node/698932#comment-5389728
Comment #10
ericduran CreditAttribution: ericduran commentedHmm, I think I'm just going to make my own subclass to base the test off, that way we can pass in d.o.
Comment #11
ericduran CreditAttribution: ericduran commentedSorry 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.
Comment #12
Louis Bob CreditAttribution: Louis Bob commentedStill got this conflict problem.
I don't understand the status of this issue ?
Comment #13
dwhutton CreditAttribution: dwhutton commentedI 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.
Comment #14
suzanne.aldrich CreditAttribution: suzanne.aldrich commentedMy 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.
Comment #15
suzanne.aldrich CreditAttribution: suzanne.aldrich commentedComment #16
dwhutton CreditAttribution: dwhutton commentedPatch #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.
Comment #17
mikhailian CreditAttribution: mikhailian commentedPatch #7 worked for me. Kudos to the author!
Comment #18
Fidelix CreditAttribution: Fidelix commentedI am having serious troubles with this bug, so this is very welcome.
I will test the patch and report back.
Comment #19
Fidelix CreditAttribution: Fidelix commentedTested patch #7. Worked. Awesome. Thanks!
Comment #20
Fidelix CreditAttribution: Fidelix commentedComment #21
xandeadx CreditAttribution: xandeadx commented#1, #4, #7 - not work
Fivestar 7.x-2.x-dev
http://drupal.org/node/1289832#comment-5634542 - work
Comment #22
hefox CreditAttribution: hefox commentedMarking a duplicate of #1289832: Conflict with the preview for comments
Comment #23
gawrion CreditAttribution: gawrion commentedHey - 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?