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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, field_ui_dependency.patch, failed testing.

nterbogt’s picture

FileSize
1.14 KB

patch -p1 file.

nterbogt’s picture

Status: Needs work » Needs review
somersoft’s picture

Patch in #2 works for me when used in a drush make file.

projects[field_permissions][version]               = 1.0-beta2
projects[field_permissions][patch][2364587]        = https://www.drupal.org/files/issues/field_ui_dependency_0.patch
mariacha1’s picture

This 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.

mariacha1’s picture

Status: Needs review » Needs work
mariacha1’s picture

Status: Needs work » Needs review
mariacha1’s picture

Status: Needs review » Needs work
mariacha1’s picture

Status: Needs work » Needs review
eelkeblok’s picture

Status: Needs review » Reviewed & tested by the community

The 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.

  • mariacha1 committed 49f5a90 on 7.x-1.x
    Issue #2364587 by nterbogt, mariacha1: Field UI dependency
    
mariacha1’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks!

(Also noting this isn't a problem in D8, because those fields don't link ever, so no need to port.)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Status: Closed (fixed) » Needs work

The last submitted patch, 5: field_permissions-field-ui-dependency-2364587-5.patch, failed testing.

mariacha1’s picture

Status: Needs work » Fixed

Weird that the bot decided to try to test this again, but whatever.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.