I noticed that the module did not work correctly when you tried to use a field within a relationship. I took a look and found that $row->nid works great when loading the current table, but when a relationship is involved, $row->{$this->field_alias} will return that if it's the main table or the correct Node ID if it's a relationship'd table. I updated that with the following patch I created and now it seems to work correctly.

CommentFileSizeAuthor
#1 784566-ffpc-node-relationships.patch626 bytesdandaman

Comments

dandaman’s picture

StatusFileSize
new626 bytes
Rob_Feature’s picture

Assigned: Unassigned » mfer

Matt, could you test this patch when you have time? Seems useful.

mfer’s picture

Assigned: mfer » Unassigned
Status: Active » Needs work

I tested the patch and it doesn't work. It fails at line 83:

foreach ( $this->view->field as $id => $field ) {
  if ($field->content_field['widget']['type'] == 'filefield_widget') {
    foreach ( $item->{$field->content_field['field_name']} as $file ) {
      $info = $getid3->analyze($file['filepath']);

The field being pulled from here for the file is the reference not the file we need.