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.
Updated: Comment #N
Problem/Motivation
While working on #576276: Abort validation when the token validation fails, I attempted to use #token => FALSE, but it resulted in Undefined index: form_token
Proposed resolution
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#5 | form-token-2143349.5.patch | 2.87 KB | larowlan |
#5 | interdiff.txt | 821 bytes | larowlan |
Comments
Comment #1
tim.plunkettComment #2
larowlanthis passes locally, not seeing the same warnings as previous issue.
Comment #3
tim.plunkettUnless you're running the simpletests as an anonymous user, it won't fail.
Comment #5
larowlanperhaps this then, also we mustn't have test coverage for that functionality either
Comment #6
tim.plunkettThanks, that works perfectly, and seems as good a place as any to unset it.
Comment #7
webchickThe before/after code here is definitely cleaner. Rock! I was a bit concerned about the ability to set #token to FALSE, but this logic already exists in FormBuilder::prepareForm and is simply copied here as well.
Committed and pushed to 8.x. Thanks!
Comment #8
amateescu CreditAttribution: amateescu commentedEdit: sorry, wrong issue :/