When I18n is enabled, the content editor gets the following PHP notice for a non-traslated taxonomy field (a template ID) when I open the node/add/ form:

Notice: Undefined index: #language in term_permissions_form_alter() (line 133 of /var/www/html/objet/sites/all/modules/term_permissions/term_permissions.module).

Comments

druvision’s picture

Title: Undefined index: #language » Preventing 'Undefined index: #language' errors
Status: Active » Needs review
StatusFileSize
new904 bytes

I've added two lines of code which prevent this error on line 132 of term_pemissions.module:

       if (!in_array('#language', $form[$field_name]))
         continue;

Attached is a basic patch

Please fix the module!

misc’s picture

StatusFileSize
new601 bytes

Could not apply your patch, so I rewrote it.

misc’s picture

Status: Needs review » Reviewed & tested by the community

Seem to work ok.

misc’s picture

Status: Reviewed & tested by the community » Fixed

Committed to latest dev.

Status: Fixed » Closed (fixed)

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

R.Sungatov’s picture

index_language-1629964-2.patch

strange, but it not work for me

i change

if (!in_array('#language', $form[$field_name])) { continue; }

on
if (!isset($form[$field_name]['#language'])) continue;