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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | nat-undefined_offset-1299666-3.patch | 809 bytes | bschilt |
| #1 | nat_undefined_offset-1299666-1.patch | 670 bytes | pingers |
Comments
Comment #1
pingers commentedSeeing 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].
Comment #2
pingers commentedComment #3
patmacs commentedI 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.
Comment #4
bschilt commentedThe 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.
Comment #5
Zen commentedLooks good. Applied based on visual inspection for the moment.
-K
P.S. Anybody keen to write tests for this module? :)