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.
If using #access = FALSE on the form, after ajax requests (e.g. remove image), groups can be gone.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2007746-er-hide-access-5.patch | 865 bytes | amitaibu |
#3 | field_access_breaks_create_with_hide-2007746-3.patch | 634 bytes | rbrandon |
#1 | 2007746-er-prepopulate-hide-field-1.patch | 2 KB | amitaibu |
Comments
Comment #1
amitaibuComment #2
amitaibuCommitted.
Comment #3
rbrandon CreditAttribution: rbrandon commentedThe above patch breaks node creation when hiding fields.
Not sure if this is the correct longterm solution but this fixes the issue in both scenarios.
-RB
Comment #4
amitaibu> The above patch breaks node creation when hiding fields.
I wasn't able to reproduce on a clean installation, what are the steps?
I'm not clear about this fix, as we are already inside
if ($id)
which means this entity is already saved.Comment #5
amitaibu@rbrandon, I understand now your patch, sorry - I've tested it with admin user, so field_access() didn't kick in.
Here's a patch to fix the issue, we'll add a test as-well as follow-up.
Comment #6
amitaibuCommitted. The tests would be in another issue.