Permissions on a couple of fields on my site were misbehaving (being switched around and such). I was able to resolve this, but while poking around, I found that previously deleted fields had left some permissions behind (see attached).

orphaned permissions

Sets of permissions from two deleted fields remain.

CommentFileSizeAuthor
People _ Permissions _ orphaned.png68.88 KBmatt.rad
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

shaisamuel’s picture

Component: User interface » Code
Priority: Normal » Major
Issue summary: View changes

This is an amazing module, with essential functionality that should make it to core, together with "Content Access". I see there are active major issues from even 2 years. Hope they will get cleared shortly. I wish I could code, but not yet.

This is a major issue since it leaves a mess in the DB. It is definitely a code error, since the functionality for handling a call from field module, of a field about to be deleted should be in place.

apmsooner’s picture

I finally tracked an issue i was having down to this one. Because field settings are cached and the permissions aren't deleted, when i copied database down to the test environment on pantheon, i was getting errors for table not being found for the deleted fields. I resolved this by manually deleting the rows related to the deleted field referenced in the role_permissions table.

  • mariacha1 committed bdfcca7 on 7.x-1.x
    Issue #2098873 by matt.rad: Deleted fields leave permissions settings
    
mariacha1’s picture

Status: Active » Fixed

Should be fixed now via a field_permissions_field_delete_field($field) hook implementation.

Status: Fixed » Closed (fixed)

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