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.
It's not always safe to make assumptions about the page that the node form is appearing on. When you look for ( arg(0) == 'node') && arg(1) == 'edit'); you are abandoning the possibility that the edit form might be getting called by another form or on another page.
Also, because the form_id is not getting checked, this form_alter code is being executed in its entirety for every form on the site.
The attached patch addresses both issues. Please check it out and get back with questions.
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#1 | cck_field_perms_0.patch | 807 bytes | Allie Micka |
Comments
Comment #1
Allie Mickavalidation ate my patch!
Comment #2
arthurf CreditAttribution: arthurf commentedThanks for the patch. Submitted for both 4.7 and 5.0
Comment #3
(not verified) CreditAttribution: commented