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.
Drupal 7.10
Latest Dev of FP
I have to reset the field permissions every time I edit a field. Resets to default (no access) after every save.
Comments
Comment #1
fangel CreditAttribution: fangel commentedYou wouldn't happen to be using the contrib module Login Toboggan, do you? I'm investigation a problem that sounds like yours and I've tracked it down to Login Toboggan.
Comment #2
blackclover CreditAttribution: blackclover commentedYes I am using it.
Comment #3
fangel CreditAttribution: fangel commentedThen your problem is likely the one described in this issue: #1365764: Adding logintoboggan.permissions.js causes error if Drupal.settings.LoginToboggan not set.
Comment #4
David_Rothstein CreditAttribution: David_Rothstein commentedJust for reference, it sounds like there's another conflict with LoginToboggan too: #1407564: CSS conflict with logintoboggan, prevents using Custom Permissions (field_permissions module)
But if I understand this issue correctly they are actually not the same bug...
Comment #5
krazykellie CreditAttribution: krazykellie commentedHello there!
I am having the same issues on our site. However, I'm not using LoginToboggan. Do you have any other suggestions on what this could be?
Comment #6
mariacha1 CreditAttribution: mariacha1 at ThinkShout commentedIf anyone is experiencing the same thing now, could you provide more information here? A few things could be happening.
Some questions:
- Do other settings on the field save properly? -- Label, Help text, Number of values, etc?
- If you set the permission to "Public" or "Private" do those options stay (in other words, is this purely an issue with the "Custom Permissions" option?
- Do the settings seem to work otherwise? (Are custom permissions applied, even if they're forgotten?)
- Is there any chance you're trying to save the permissions on a per-instance level, instead of a per-field level? (In other words, saving a Body field as "public" on Articles, then seeing values overridden for the Body field on a Page.)
Comment #7
granticusiv CreditAttribution: granticusiv commentedI have a 'List (text)' field on a RedHen Contact (7.x-1.12) entity type. I also have LoginToboggan (7.x-1.5) enabled/configured. I've tested editing the Label, 'Help text', 'Default Value', and 'Allowed values list'. All these actions remove the custom permissions I had setup.
In Console, I get this Error when I have the edit page open for the list field:
Uncaught TypeError: Cannot read property 'preAuthID' of undefined
Other details that may help:
Core (7.52)
Field Permission (7.x-1.0-beta2)
I also have jQuery Update (7.x-2.7) configured to use jQuery 1.8 for frontend and default for backend/admin
Comment #8
mariacha1 CreditAttribution: mariacha1 at ThinkShout commentedHi granticusiv
Have you tried applying the patch from https://www.drupal.org/node/1365764#comment-10286257 ? That preAuth error points to that.
Also, the 7.x-1.0 full release of Field Permissions is a more recent version and should at least warn you if you are getting this console error (and not lose your permissions). Can you try upgrading and see if that helps?
Comment #9
ThuleNB CreditAttribution: ThuleNB commentedI am experiencing this issue too. When I resave my field settings the permissions get reset. My changes (help text, default value, etc.) get saved. After each resave I need to set permissions again.
My setup:
- version 7.10 of field permission
- latest drupal core
- behaviour appears for text field
- other field related modules installed: field group, form tips, dependent fields, field default token, node limit
Maybe one of these other modules causes the issue?
Comment #10
mariacha1 CreditAttribution: mariacha1 at ThinkShout commented@ThuleNB -- are you seeing any javascript errors on the page?
I'll check out the module with those other modules to see if I can replicate. I suspect that it's conflicting JS.
Comment #11
ThuleNB CreditAttribution: ThuleNB commentedThanks for your quick reply. I am not much of a coder but tried to look for a JS error and recognized that one:
Shame on me, this was already mentioned above. I'll follow the related issue for LoginToboggan and see if it solves things for me.