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.
When I enable natural sort on a field, I can't change field permissions. Disabling it, making changes and re-enabling works however so not a huge issue.
Comments
Comment #2
generalredneckDo you by chance get a php error or something?
I'm not 100% sure how to reproduce this or the modules involved right off hand.
Appreciate any extra info you can give me.
Comment #3
niallmurphy-ie CreditAttribution: niallmurphy-ie commentedTo reproduce,
1. Install views_natural_sort_text_field and field_permissions modules with their dependencies on a clean drupal installation.
2. Enable the sort on a field.
3. Try to do custom field permissions on that field from the field's settings.
The permissions are still changeable from the admin/people/permissions page but not the field's settings page. It doesn't matter if the custom permissions were set before or after enabling the natural sort.
Comment #5
generalredneckOk so this one was tough. It turns out that doing the batch kills all other submit handlers for some reason. I had to put my module after field permissions on the form alter. With that said, field permissions already is set to a weight of 50 becuase it expects to be last in most cases. This is one of those cases where it couldn't be. I do have a concern though... I had to do an implements_alter and the hook that this runs under is "Form Alter". so as it stands... on all form alters, my module will run last... not sure this is a good thing and there is no way to get context of which form you are altering in the implements_alter.