I set up a simple page with no fn or footnotes tags and added text to the body and saved it.
I set up a view
- show all nodes
- show fields: body footnotes, body content

When showing nodes that have footnotes, everything displays as expected

But when showing a node with no footnotes, the full body content appears in both the body content and the body footnote fields of the view for that node.

CommentFileSizeAuthor
#2 1296978.patch540 bytesdpatte

Comments

dpatte’s picture

I have a solution:

in footnotes_views_handler_field_body_footnotes.inc
in function render_name($data, $values)
after the if clause
add the following

    else {
      $data = '';  /* no footnote */
    }

before the return;

ie: it should look like this

    }
    else {
      $data = '';  /* no footnote */
    }
    return $data;
  }

Now I have to learn how to create a patch for the dev for 7.x and 6.x :)

dpatte’s picture

StatusFileSize
new540 bytes

patch file included

hingo’s picture

Status: Active » Reviewed & tested by the community

Ah yes, I see the problem and the patch is correct.

I have given you commit rights to the git repository and edit rights to the project page. Go ahead and commit the patch as discussed.

Even if the views code doesn't work in the current D7 release, please commit this also to that branch so that once it is made to work the same bug is already fixed.

rooby’s picture

I will commit this shortly. I just want to get the drupal 6 version in line with the drupal 7 version first.

rooby’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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