Getting a dozen or more of these errors after enabling view override on my vocabularies.

Notice: Trying to get property of non-object in tvi_get_term_info() (line 291 of /.../tvi/tvi.module).
Notice: Trying to get property of non-object in tvi_get_term_info() (line 294 of /.../tvi/tvi.module).

Any idea what that could indicate? I could provide more info if needed.

CommentFileSizeAuthor
#3 tvi-get_term_info-1547340-2.patch436 bytesmbutsko

Comments

dgastudio’s picture

same problem here.

TimVS’s picture

I`ve the same problem.

I think the problem, for me, is the taxonomie menu, because the module doesn`t delete menu items when the terms are delted and therefore the menu links containts termId`s which doesnt exist anymore.

A possible sollution is adding this code:

//retrurn nothing when the term is empty    
if(!$term){
      return;
  }

under

if (!array_key_exists($tid, $term_info)) {
  	$term = taxonomy_term_load($tid);
    // Try using term and vocabulary overrides.

Not the best solutuion but a good fix when you are on a live site

mbutsko’s picture

StatusFileSize
new436 bytes

Thanks TimVS. I turned that in to a patch, if anyone wants it.

mbutsko’s picture

Status: Active » Needs review
TimelessDomain’s picture

Status: Needs review » Reviewed & tested by the community

it works! thanks

caw67’s picture

works for me too. i dont work with taxonomy menu

duaelfr’s picture

Version: 7.x-1.0-alpha2 » 7.x-1.x-dev
Status: Reviewed & tested by the community » Closed (fixed)

Pushed in the last dev release.