Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
This is my first bug report so dont be angry if I don't do it well ;)
ok, I just grabbed the current cvs snapshot and setup a basic website.
I have enabled comments for some stories and it's impossible to post a comment...
I always get that message:
Validation error, please try again. If this error persists, please contact the site administrator.
The website is here: http://moi.homeip.net/~pol/site/php/loic/
Hope it's ok ;)
Keep up the good work !
Ciao
Comment | File | Size | Author |
---|---|---|---|
#18 | comment_token.patch | 1.15 KB | chx |
#7 | hdden_def.patch | 719 bytes | chx |
#4 | 46227.patch | 889 bytes | Dave Cohen |
Comments
Comment #1
PolHere is my php version: 5.1.1
Hope it helps
Comment #2
Morbus IffI can confirm this on today's HEAD, with anonymous or authenticated users. I also receive a "You have to specify a valid date." error.
Comment #3
Dave Cohen CreditAttribution: Dave Cohen commentedAt the bay area bug fix, I can reproduce as well. Looking into it...
Comment #4
Dave Cohen CreditAttribution: Dave Cohen commentedAn earlier patch simply missed a line. This patch should complete it.
Comment #5
singularoJust tried this patch on my drupal head version, and it solves the issue.
Comment #6
Dries CreditAttribution: Dries commentedCommitted to HEAD. Thanks.
Comment #7
chx CreditAttribution: chx commentedWith form API this won't work.
$form['form_token'] = array('#type' => 'hidden', '#value'
once you set #value it's, well, set. No matter what you put into form_token, Drupal will accept it rendering the token system useless.On the other hand, the next line... you do not want form_id to be overridden by _POST['edit']['form_id'] because this leads to the strange situation that if you submitted a form and drupal does not reload the page (rare but happens) then you can't submit another form because just after submission ALL forms have the same (and wrong) form_id.
Comment #8
chx CreditAttribution: chx commentedComment #9
adrian CreditAttribution: adrian commentedChx is in fact correct.
By setting #value, the value of the element becomes immutable, by setting default_value, it takes the value in $_POST into account
when choosing a final value.
+1
Comment #10
chx CreditAttribution: chx commentedComment #11
Dries CreditAttribution: Dries commentedCommitted.
Comment #12
Morbus IffI am still having problems with this, with today's HEAD.
a) Anonymous user.
b) Create comment.
c) Hit "Preview" (required in this case).
d) Get the validation error.
e) Hit "Post" anyways.
f) Comment gets posted.
Anyone else confirm?
Comment #13
tomsys CreditAttribution: tomsys commentedto Morbus...
no,, this is gone, now it works as it should, try to update your form.inc and comment.module from the HEAD.
T.
Comment #14
Morbus IffAs mentioned, I'm using today's HEAD, after chx's patch hit.
Comment #15
tomsys CreditAttribution: tomsys commentedMorbus,
I'm using all stock modules and all include files from the HEAD, no extra stuff, validation Bud was in form.inc where chx didn't change second function,...., check the version out, it should be - $Id: form.inc,v 1.58 2006/01/25 08:40:53 dries Exp $
..at least that is what I have and it Rocks..
T.
Comment #16
Morbus IffAyup - I'm actually running one version higher than you are. Could you perhaps grab 1.59 and test?
Comment #17
tomsys CreditAttribution: tomsys commentedMorbus,
...Ok, Now cofirming Validation "Bug".. is up again, you were right about that.. sorry for missleading, form.inc v.1,59 is dead again ;(
T.
Comment #18
chx CreditAttribution: chx commentedI fixed the form API bug which hide the comment module. Now the comment module bug came to light. $edit['pid'] is 0 when adding a comment. When you preview it's empty. So. If you were commenting node 12 then the token was
comment120
and thencomment12
. The fact that comments got broken is proof that form tokens now work right. And why were you able to submit? Because a) the form submit button was not wrapped into form_get_errors() b) after preview the token have not changed further so _this_ time the submit succeeded!Comment #19
chx CreditAttribution: chx commentedComment #20
Morbus IffPatch works. RTC.
Comment #21
Dries CreditAttribution: Dries commentedI didn't understand your explanation. Care to elaborate? I don't understand why pid would change ... *confused*
Comment #22
jvandyk CreditAttribution: jvandyk commentedTested it. Works.
Comment #23
chx CreditAttribution: chx commentedcomment_reply :
this sets pid to zero. This does not fire on preview. I do not dare to set it to empty, who knows what will break. My fix is solid and breaks nothing.
Comment #24
aaron CreditAttribution: aaron commented+1 on this patch. Fixes the error.
Comment #25
Dries CreditAttribution: Dries commentedI still don't understand this (your explanation isn't very helpful). I'll have to investigate this more before I can commit.
Comment #26
chx CreditAttribution: chx commentedDries, please read comment_reply function, I really can't say more.
Maybe quoting more from that function helps?
I hope this now shows what's going on.
Comment #27
Wesley Tanaka CreditAttribution: Wesley Tanaka commentedI applied the patch attached to http://drupal.org/node/46227#comment-69061
It fixes the problem for me.
Comment #28
tomsys CreditAttribution: tomsys commentedHello,
New comments are created ok .. but [delete] is screewd.. it's not working properly.. so this .patch is not ready for commit yet
it gives some .error message like this:
..and node_comment_statistics table is not update properly..
T.
Comment #29
chx CreditAttribution: chx commentedThat's a whole another error and there is an issue for it... maybe even fixed in HEAD already.
Comment #30
chx CreditAttribution: chx commentedThat's a whole another error and there is an issue for it... maybe even fixed in HEAD already.
Comment #31
DaveNotik CreditAttribution: DaveNotik commentedHi:
I only started getting this error when I enabled the subscriptions.module.
"Validation error, please try again. If this error persists, please contact the site administrator."
Drupal 4.7beta4. Is this related?
--D
Comment #32
jasonwhat CreditAttribution: jasonwhat commentedI can confirm this problem today, but mostly I'm just adding my comment so I can stay "subscribed" to this thread through my tracker.
Comment #33
chx CreditAttribution: chx commentedhttp://drupal.org/files/issues/comment_token.patch still awaits commit.
Comment #34
Mefdahl CreditAttribution: Mefdahl commentedI got this error with beta 4, grabbed the comments.module from cvs-HEAD and patched it with normal linux patch and it worked like a charm.
Comment #35
archetwist CreditAttribution: archetwist commentedUser of my site hadn't been able to post comments due to the fact that he has (propably) a dynamic IP address. comment_token.patch didn't work for me but token.patch posted here did the job.
Comment #36
Dries CreditAttribution: Dries commentedCommitted a simplified version of this patch. Thanks.
Comment #37
tomsys CreditAttribution: tomsys commentedHello,
@chx
..could you please enlighten me about comment delete probably "Bug" .. I still can't delete them .. I get taht SQL error\warning message and you said that it's a known "bug" what should be allready fixed in HEAD .. I have everything from the HEAD .. every latest update from today.. and still no LUCK .. could you please point me to the .patch that will fix this SQL thing ...
Regards,
T.
Comment #38
tomsys CreditAttribution: tomsys commentedHello Everyone,
It seams for me that SQL request is very ODD when we delete some comments and it may help for someone to get this solved !!
here is my version of the function _comment_update_node_statistics($nis) in comment.module...
Add - global $user;
Removed - wrong SQL;
Add - the right SQL String;
END..
Regards,
T.
Comment #39
Zen CreditAttribution: Zen commented@tomsys: Please open a new issue for the botched query. It is unrelated to this issue. Please also submit all changes in patch form.
Thanks
-K
Comment #40
philipk CreditAttribution: philipk commentedSo did we get anything sure on this?
I've just installed 4.7, and still get the error
Comment #41
Morbus IffIf by "installed 4.7", you mean "installed 4.7b4", it's not fixed in that version, but is in CVS.
Comment #42
(not verified) CreditAttribution: commentedComment #43
teledyn CreditAttribution: teledyn commentedHaving done nothing more than to edit a bad link in a comment, our 5.1 site is now seized by this same problem; there has been no upgrades, no system upgrades, no modules added, no modules removed, no changes in PHP, no changes in Apache, no changes in Linux. The only activity on the entire server has been to post one new blog node, have three comments added to it, and the last comment trivially edited three times. It's not just that it worked this morning or even yesterday; it has been working fine for years, our site just hit its 5th anniversary, and then BAM, the dreaded Validation log-jam :(
Is there a hack that can get an installed site back in operation? Any manual SQL operation, deleting some records, a tweak to the PHP or the variables tables, something, anything? Upgrading to the head is simply not an option short-term.
Comment #44
teledyn CreditAttribution: teledyn commentedWeird ... it ... just ... went ... away?
Spooky. Came out of nowhere, and has now apparently slipped back into that nether realm.
(cue the theramins ...)
Comment #45
Tpainton-1 CreditAttribution: Tpainton-1 commentedSame ERROR. My site has been up for two years. I upgraded to 5.7 two weeks ago. Now this error today after trying to edit ecommerce transaction flow.
Very annoying.