Hi,

I'm getting a notice when viewing a term page:

Notice: Trying to get property of non-object in i18nviews_handler_argument_taxonomy_term_name->query() (line 30 of G:\WWW-ROOT\projects\www.testing.local\sites\all\modules\contrib\i18nviews\includes\i18nviews_handler_argument_taxonomy_term_name.inc).

I wasn't sure what other information I should provide. Please let me know what other information I could provide if needed.

My module development skills are limited but the notice is gone when I wrap the if statement with
if(is_object($source)){...}
Although I don't think that's the right solution.

Thx,
Haztnie

Comments

Ambidex’s picture

I got the same error, and fixed this in the same manner as above. Seems to break nothing else and fixes the error. Would like to hear if this is the right way.

jasom’s picture

How I can edit it? I have same problem. This is error, which I got:

Notice: Trying to get property of non-object in i18nviews_handler_argument_taxonomy_term_name->query() (line 30 of site.com/www/sites/all/modules/i18nviews/includes/i18nviews_handler_argument_taxonomy_term_name.inc).

Here is source code

27    // Translate all availible terms.
28    foreach ($this->value as &$value) {
29      $source = i18nviews_locale_source($value, 'taxonomy');
30      if ($source->source) {
31        $value = $source->source;
32      }
33    }

How I can fix it? Patch would be very helpfull :-)

How to repreduce error:

Create views with list of terms and in Contextual filters add Taxonomy Term: Name (translated). In When the filter value is NOT in the URL Check Display a summary and in More check Glossary mode (1 character), In Case - uppercase and in Case in path - lovercase. That's it.

knalstaaf’s picture

Issue summary:View changes

I had the same issue using (term) Taxonomy term: Name (translated) as a contextual filter. When I replaced this with (term) Taxonomy term: Name (<- no translated, and default value being "taxonomy-ID from URL"), the notice disappeared, and I got my translated terms displayed by using (term) Taxonomy term: Name (translated) as a Field.