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.
I have a pageroute setup with two pages. The fist just displays a node, the second lets the user edit their profile (content_profile). On clicking the forward button on the second page (the one that uses this modules 'User account editing' page type), I get taken back to the first page, with the error message:
Validation error, please try again. If this error persists, please contact the site administrator.
Comments
Comment #1
mrfelton CreditAttribution: mrfelton commentedMore info...
If the User account editing is the only page in the pageroute, it works.
If the User account editing page is the second page in the pageroute, with a Node display page before it, I get the validation error when saving the second page
If the User account editing page is first in the pageroute, and a Node display page follows it, there are no errors after submiting the first page (User account editing), but when submiting the second/last page (Node Display) I get taken back to the first page, with the Validation error AND another error stating that one of the cck fields (numeric) is required - even though the field already had a value, and I didn't even try to edit that field!
Comment #2
thomjjames CreditAttribution: thomjjames commentedHi,
I'm unable to recreate this error.
What form fields do you have in your content profile form?
Thanks
Tom
Comment #3
mrfelton CreditAttribution: mrfelton commentedI have 3 cck fields, an Imagefield, a Float, and a CurrencyCCK. It is the Float field that gets reported as missing a value when I get booted back to the form as described in my 3rd scenario above,.
Comment #4
mrfelton CreditAttribution: mrfelton commentedAfter a VERY painful debuging session, I have managed to trace thei to an incompatibility with the memcache module. It seems that with that module enabled, $form_state is not managed properly and your attempt to do
if (!isset($form_state['storage']['route']))
inpageroute_form()
returns false, resulting in the pageroute being built again from page1.Comment #5
mrfelton CreditAttribution: mrfelton commentedActually, restarting memcached seems to have fixed it and now it works just fine with memcache installed. Really strange.
Comment #6
thomjjames CreditAttribution: thomjjames commentedThanks for testing this out and tracking down the issue!!
I've marked it as "needs review" so we can keep any eye on it, I haven't had time to test it with MemCache yet.
Tom
Comment #7
mrfelton CreditAttribution: mrfelton commentedI actually think the problem is more related to pageroute than to profile_setup, since that's where all the logic comes from.
Comment #8
thomjjames CreditAttribution: thomjjames commentedComment #9
superdorx CreditAttribution: superdorx commentedI don't have memcache installed on my site and I still get the same error. Is there another workout?
Comment #10
superdorx CreditAttribution: superdorx commentedI found a work around that hopefully helps troubleshoot the problem. I installed this module for the first time before I starting getting the error message. After I flashed all cache the error stop and I was able to create new routes. I guess there was something in the db conflicting before I cleared all cache.
Comment #11
Suitov CreditAttribution: Suitov commentedI have the same problem with Content Profile. I've tried going in through both the member profile's "click here to create your profile" type link, and through the Create Content route.
I do not have memcache installed. Clearing the cache repeatedly has not helped.
Unlike other users reporting validation problems, I don't have attachments or image fields or any other unusual fields in the nodetype. The only two required fields are title and body. I've put only plain text in both.
Comment #12
alfili CreditAttribution: alfili commentedThe facts I've found on this problem after submitting a content search:
1. some of my Drupal 6 sites do have this problem and some do not.
2. only logged in users would encounter this problem.
3. the problem occurs for all three browsers tested (Mac OS 10.5.8) -Safari, Firefox and Opera.
4. turning the CAPTCHA module off makes no difference.
Comment #13
marcred CreditAttribution: marcred commentedWhen a user is logged into the site, any form that is presented to them has a hidden value called "form_token", which is unique to the user. This value is included in the form to prevent a malicious website from hijacking a user's account through the user of a Cross-site Scripting Attack.
The value is created by Drupal based on the user's session ID, which is a random value that is unique for each user. There seem to be some situations in which a user's session ID will expire, but due to weird caching (or whatever), the user is presented with a "stale" version of a form, and therefore with a "stale" form_token, which is no longer valid. Submitting a form with a stale (or missing) form token WILL result in the dreaded "Validation Error".
Try to logout and access through another browser and try to clear caches (and views cache) and/or:
Remove all coockies from your site and reload doing a "power refresh" on that page, by holding down the shift key and clicking the "reload" button.
Hope this helps.