Problem/Motivation
The following problem exists:
- Create a Role Reference field for a Content type. In the Field settings, make a selection of roles;
- Add content;
- Add a new role;
- Re-visit the Field settings. Try to add the new Role to the selection. It is not possible. The field with role-selection is greyed out.
Proposed resolution
Comment #1 has a solution, which is explicitely shown in #6.
Original report by devenderdagar
Thanks a lot for such a nice module. I was just exploring this module and found that if some more roles are added at later stage after creating some contents where Role reference is used as cck, the module doesnt allow to check new Roles in the content type settings. Any idea ?
Regards, Devender
Comments
Comment #1
oda commentedThis field update limitation can be really annoying. Usually you can ignore the message and update the field, but this is not the case. A simple workaround is to edit rolereference.module and comment line 57.
Comment #2
johnvEDIT: this makes no sence.
devenderdagar, the status of your post was misleading: 'needs review' implies an attached patch.Well, now it has... ;-)If you do not check any of the roles in the field settings, they will ALL appear in the node edit/add form.
A newly created role will also appear.
Comment #3
johnvOTOH, the same patch (but better) can be found here: #1280532: Allow any role to be referenced if none are explicitly selected.
marking this as a duplicate.
Comment #4
oda commentedI do not consider this as duplicate. It's a different request. We are talking about the possibility to change the field configs after its creation.
Comment #5
johnvEDIT: this makes no sence.
Then I do not understand what you mean. Maybe you need to run the following page after changing the settings: /admin/report/status/rebuild (For Rebuild permissions)If so, the module should call variable_set('node_access_needs_rebuild', TRUE); after changing a role field.
Comment #6
johnvI came across this issue. My remarks earlier are *** . I totally misunderstood the OP.
The proposed solution in #1 should do the trick. Below the explicit code.
(Setting this 1-line-patch to Needs Review, although there is no real patch-file.)
Comment #7
johnvComment #8
johnvComment #9
johnvA proper patch.
Comment #10
greg__ commented#9 works for me
Comment #11
mykhailo.levchenko commentedTested this. Works for me
Comment #12
alex liannoy commentedComment #15
deekayen commentedComment #16
deekayen commented