Using the latest dev.
Have tried two different vocabularies to make this work, both are CCK fields, 1 has a widget type of check boxes, the other is a select list.
Tried setting the grant role permission to just the role I want to elevate permissions for, and then tried setting all of the roles to with the exception of the role I want to elevate for.
Have tried rebuilding permissions.
Under all circumstances I get the following Notice at the top of the node edit screen:
Notice: Undefined index: #type in tac_lite_create_form_alter() (line 59 of /home/theo2010/public_html/drupal/sites/all/modules/tac_lite/tac_lite_create.module).
Notice: Undefined index: #type in tac_lite_create_form_alter() (line 59 of /home/theo2010/public_html/drupal/sites/all/modules/tac_lite/tac_lite_create.module).
Notice: Undefined index: #type in tac_lite_create_form_alter() (line 59 of /home/theo2010/public_html/drupal/sites/all/modules/tac_lite/tac_lite_create.module).
Notice: Undefined index: #type in tac_lite_create_form_alter() (line 59 of /home/theo2010/public_html/drupal/sites/all/modules/tac_lite/tac_lite_create.module).
Notice: Undefined index: #type in tac_lite_create_form_alter() (line 59 of /home/theo2010/public_html/drupal/sites/all/modules/tac_lite/tac_lite_create.module).
Notice: Undefined index: #type in tac_lite_create_form_alter() (line 59 of /home/theo2010/public_html/drupal/sites/all/modules/tac_lite/tac_lite_create.module).
Notice: Undefined index: #type in tac_lite_create_form_alter() (line 59 of /home/theo2010/public_html/drupal/sites/all/modules/tac_lite/tac_lite_create.module).
Notice: Undefined index: #type in tac_lite_create_form_alter() (line 59 of /home/theo2010/public_html/drupal/sites/all/modules/tac_lite/tac_lite_create.module).
Additionally, the actual role permission elevation does not take place as the role does not gain edit privileges and instead, sees an access denied screen. Please help as I really need this module to circumvent drupal's lack of "unpublished" variant permissions.
Comments
Comment #1
puravida commentedI am also seeing this except with #required instead of #type
Undefined index: #required in tac_lite_create_form_alter() (line 92 of /home/...../public_html/modules/tac_lite/tac_lite_create.module).
This error only occurs on user accounts (looks like admins still see the field) and I see no correlation of field types, names, or data that is causing it. I haven't dug into the code yet, as I am under a deadline to show "something" for this mock-up in a few days.
Update: I just figured out that if I uncheck "required field", the error goes away and the field remains hidden. Hope that helps pin it down.
Thanks for a great mod... :)
Comment #2
BenK commentedSub
Comment #3
kmare commentedSubscribing, having the very same issue as puravida and trevorG
Edit:
ok, I found a way to trigger it. I'm using the "field permissions" module. Role/User A creates a node with a term referenced field. Role/User B, has access to view the field but no editing option. The error/warning shows up. If I set the editing permission to everyone, then no warning popups.
The warning i get is:
Notice: Undefined index: #type in tac_lite_create_form_alter() (line 59 of sites/all/modules/tac_lite/tac_lite_create.module).
Hope it helps to fix the issue.
Thank you in advance
Comment #4
stephenrobinson commentedsame error, using field permissions and og, no content for non admins
Comment #5
jag339 commentedSame error. Set the field permission to administrator edit. Anybody else who tries to access the content type gets an error. Would somebody please fix this?
Comment #6
jide commentedTo fix this quickly, change line 92 of tac_lite_create.module :
if (count($form[$field_name][$field_language]['#options']) == 0 && $form[$field_name]['#required'] == TRUE) {to:
if (count($form[$field_name][$field_language]['#options']) == 0 && isset($form[$field_name]['#required']) && $form[$field_name]['#required'] == TRUE) {Comment #7
jide commentedHmmm to fix the issue mentionned in #1 : Undefined index: #required in tac_lite_create_form_alter().
But that's the same for the #type error :
line 59, replace :
if ($form[$field_name][$field_language]['#type'] != 'select' && $form[$field_name][$field_language]['#type'] != 'radios'){with :
if ($form[$field_name][$field_language]['#type'] != 'select' && isset($form[$field_name][$field_language]['#type']) && $form[$field_name][$field_language]['#type'] != 'radios'){Comment #8
Dave Cohen commentedPretty sure I just fixed these warnings. Let me know if any problems.
Comment #9
stephenward commentedThe problem still seems to occur. I'm using the latest releases of both modules, Taxonomy Access Control Lite 7.x-1.0-rc1 and Field Permissions 7.x-1.0-beta2, and non-administrators are seeing these errors.
Comment #10
Dave Cohen commentedI just made a 7.x-1.0-rc2 release. Please give that a try.
The module has been stable. Will make final 1.0 release if you find no problems.