By Shrikey on
I get this notice with each node: Notice: Undefined index: nl in node_tokens() (line 139 of ........drupal\modules\node\node.tokens.inc)
I made my page node-type with multilanguage=false and added a body field. Then I imported 300 nodes from joomla with the joomla module. Then I made the page node-type multilingual and changed some nodes to language = 'nl'.
In de node table, those nodes get 'nl' in the language column, but the `field_data_body` and `field_revision_body` tables keep their language = 'und' value. Even with new nodes, made in language 'nl', the notice shows.
Anybody knows what is wrong?
Comments
Looks like node.tokens.inc is
Looks like node.tokens.inc is just trying to set
$item = $node->body[$node->language][0];without checking that$node->body[$node->language]exists first ... and since this is a non-multilanguage node I would guess it's never going to exist.If the page renders fine apart from the notice, this may be just lazy coding rather than a bug. Still, it could be worth raising this as an issue.
++Andy
I got the same error
I got the same error
How can i solve that
This is a core bug:
This is a core bug: http://drupal.org/node/1178580.
It's a notice, rather than a
It's a notice, rather than a bug, but yeah.
++Andy
This is for drupal 8.x is
This is for drupal 8.x is there any fix for drupal 7.x
Got an error.
Notice: Undefined index: en in node_tokens() (line 139 of /home/server/public_html/modules/node/node.tokens.inc).
Notice: Undefined index: en in node_tokens() (line 139 of /home/server/public_html/modules/node/node.tokens.inc).