If I add field "Biblio: Authors" to a views, I get

Notice: Undefined property: stdClass::$biblio_tid in biblio_handler_field->set_label() (line 52 of /biblio/views/biblio_handler_field.inc).

Comments

schildi’s picture

I also get long lists of message like the one above (line 54 now).
And it is probably not more than a hack, but it helps. Change the if-expression
if (!$this->options ...
in function

  function set_label(&$values) {
    if (!$this->options['biblio_label']) return;
    $tid = $values->biblio_tid;
    $this->options['label'] = isset($this->labels[$tid]) ? $this->labels[$tid] : $this->labels[0];
  }

to

    if (!$this->options['biblio_label'] || !isset($values->biblio_tid)) return;
schildi’s picture

Status: Active » Needs work

someone should have a look at my hack and create an applicable patch.

drasgardian’s picture

Status: Needs work » Needs review
StatusFileSize
new753 bytes

Thanks for posting your solution schildi, I have attached it as a patch.

You might like to read over this page to learn how to create patches yourself: https://drupal.org/node/707484

schildi’s picture

thanks for your efforts and you hint, drasgardian

I do know how to set up patches. What I wanted to achieve is that somebody has a critical look at the approach.

Best regards
schildi

presleyd’s picture

Patch tested, no problems so far.

rjerome’s picture

Issue summary: View changes
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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