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.
There is a report page provided by this module (/admin/reports/fields/permissions) that you can use to see what permissions are set for what fields.
Now field_permissions doesn't depend on Field UI, but for this report page _field_ui_bundle_admin_path() is called.
Fatal error: Call to undefined function _field_ui_bundle_admin_path() in /sites/all/modules/contrib/field_permissions/field_permissions.admin.inc on line 353
I don't want to have field_ui enabled by default so I've provided a patch that both fixes the issue, and doesn't change the dependencies.
Comment | File | Size | Author |
---|---|---|---|
#5 | field_permissions-field-ui-dependency-2364587-5.patch | 1.63 KB | mariacha1 |
#2 | field_ui_dependency.patch | 1.14 KB | nterbogt |
Comments
Comment #2
nterbogt CreditAttribution: nterbogt commentedpatch -p1 file.
Comment #3
nterbogt CreditAttribution: nterbogt commentedComment #4
somersoft CreditAttribution: somersoft commentedPatch in #2 works for me when used in a drush make file.
Comment #5
mariacha1 CreditAttribution: mariacha1 at ThinkShout commentedThis works as a solution, but it seems a bit drastic to me. All that the field ui is used for is finding the path to the specific field's editing page anyway. If field UI is disabled, why not just not make that a link?
Patch enclosed does that. Throwing it up here to see if it triggers any failed tests while I get a proper dev environment set up.
Comment #6
mariacha1 CreditAttribution: mariacha1 at ThinkShout commentedComment #7
mariacha1 CreditAttribution: mariacha1 at ThinkShout commentedComment #8
mariacha1 CreditAttribution: mariacha1 at ThinkShout commentedComment #9
mariacha1 CreditAttribution: mariacha1 at ThinkShout commentedComment #10
eelkeblokThe choice between these two solutions depends on a fairly fundamental question. If Field UI is not available, does it make sense for users to still want to inspect field permissions. Also, would it make sense to someone trying to figure out why they do not get to see the permissions report, that they need to enable Field UI to do so?
I for one would vote for keeping things simple and "just" disabling the link, as the patch from #5 does. It does the job, so setting to RTBC to maybe get some maintainer attention.
Comment #12
mariacha1 CreditAttribution: mariacha1 at ThinkShout commentedCommitted. Thanks!
(Also noting this isn't a problem in D8, because those fields don't link ever, so no need to port.)
Comment #15
mariacha1 CreditAttribution: mariacha1 at ThinkShout commentedWeird that the bot decided to try to test this again, but whatever.