Error message
Notice: Undefined offset: 0 in nat_field_formatter_view() (line 240 of /sites/all/modules/nat/nat.module).

This happened when I tried to use the NAT link type of display

Comments

pingers’s picture

StatusFileSize
new670 bytes

Seeing the same issue.

I.e. A nid is trying to be associated with a totally unrelated vocabulary term, which isn't even configured for NAT module.

I think this just needs a "if (count($nids)) {" then add data to the $element[$delta].

pingers’s picture

Status: Active » Needs review
patmacs’s picture

I think that hooking a term's description up to a node's description and then submitting a new node with an empty description will result in a similar error.

bschilt’s picture

StatusFileSize
new809 bytes

The patch in #1 works but if a taxonomy term doesn't have a corresponding node, then it won't print anything. Here is one that will print the term as a nat link or plain text if it isn't tied to a node.

Zen’s picture

Status: Needs review » Fixed

Looks good. Applied based on visual inspection for the moment.

-K
P.S. Anybody keen to write tests for this module? :)

Status: Fixed » Closed (fixed)

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