Closed (fixed)
Project:
Taxonomy Term Permissions
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2012 at 06:11 UTC
Updated:
25 Mar 2016 at 18:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Exlord commentedi am not sure whats wrong with ur queries but both of the are returning
false.i changed the queries and they seems to be working dine now ...
line 261: function term_permissions_allowed :
Comment #2
misc commented@Exlord, could you please add a patch for the fix?
Comment #3
anavrin commentedHi there, I had the same problem:
Notice: Undefined variable: vocabulary in term_permissions_form_alter() ...
The problem is when (at least in my case) user has permission to only one term in a vocab. Have no idea why in the condition:
if (count($options) <= 1) was less or equal ?
it sould be if (count($options) < 1) - because sometimes user is allowed only one value ...
Changing this solved my problem. I also used a more redable form me version of code sent by Exlord #1 ...
So my whole modification looked like this:
if (count($options) < 1) {and
instead of
Comment #4
anavrin commentedand no matter what there should be some exception catch added in the situation when user is not allowed to the field at all ...
Comment #5
drasgardian commentedAttached is a patch against the latest dev implementing the work from #3 and also addressing #4 by denying the user access to the form if they do not have permissions for any of the terms and the field is required.
Comment #6
matthiasm11 commentedHi
When i read through the #5 patch, I think there is a closing parentheses missing:
vocabulary.', array('%user' => isset($user->name) ? $user->name : variable_get('anonymous', 'Anonymous'),should be
vocabulary.', array('%user' => isset($user->name) ? $user->name : variable_get('anonymous', 'Anonymous')),The patch works fine.
Comment #7
gmasky commentedHas this been fixed in the core module? I am still getting this error here http://www.jaaindia.com/user/register
Comment #8
gmasky commentedNever mind. I had a field in the registration form and had not given permission to anonymous users to access the field.
Comment #9
aaronmchaleI'm getting this same error when using the Pollfield module, using the latest 7.x release of both of these modules. I'm not sure if the issue is with this module or Pollfield though.
Any help would be appreciated
Comment #10
Camario39 commentedIm not sure if this is related, but as a non admin user with permission to only a single term. If the user does not have access to the DEFAULT term selected in the manage fields section, then this error will display.
removing the default fixed the issue for me.
Comment #12
roborn commentedPatch on #5, we need to verify if permissions are enabled for the term and update code from 6.x
I fixed that and committed it.
Thank you, guys :)