Got this error directly after creating the first article. The article has tags associated with it.

Notice: Undefined index: taxonomy_forums in include() (line 20 of /home/admin/public_html/sites/all/themes/orange/templates/node.tpl.php).

Could be completely unrelated to this theme (which I really like btw), but I can't seem to fix it.

Comments

S@ilor’s picture

Hi there,

I get various error messages, but here's some relating to the theme (hope it's ok I tab into this thread):

Notice: Undefined index: primary_links in include() (line 17 of ...\drup7\sites\all\themes\orange\preprocess\preprocess-page.inc).
Notice: Undefined index: sidebar in include() (line 151 of ...\drup7\sites\all\themes\orange\preprocess\preprocess-page.inc).
Notice: Undefined index: skinr in include() (line 169 of ...\drup7\sites\all\themes\orange\preprocess\preprocess-page.inc).
Notice: Array to string conversion in rdf_preprocess_image() (line 773 of ...\drup7\modules\rdf\rdf.module).

Recoverable fatal error: Argument 1 passed to drupal_attributes() must be an array, string given, called in ...\drup7\includes\theme.inc on line 1517 and defined in drupal_attributes() (line 2258 of ...\drup7\includes\common.inc).

Let me know, if I should open another issue instead, or if more information is needed.

- Christian

emcniece’s picture

Title: Undefined index: taxonomy_forums in include() » Undefined index: taxonomy_forums in include() AND MORE
emcniece’s picture

@Drunkensailor

It sorta looks like the theme is not taking into account some of the additions we've made through modules in D7. I added taxonomy tags to my posts, did you add anything to your primary links or sidebar?

emcniece’s picture

Found a temporary solution... will keep hunting, but for now this worked for me: add the line

error_reporting (E_ALL ^ E_NOTICE);

to the top of sites/all/themes/orange/templates/node.tpl.php.

Also, check out http://www.dmxzone.com/go?13811

emcniece’s picture

Found a more permanent solution, checked if each variable was set (isset) before printing - as indicated in the link in the last post.

Replaced line 15:
<?php if ($content['field_tags']): ?>
with:
<?php if (isset($content['field_tags'])): ?>

Replaced line 20:
<?php if ($content['taxonomy_forums']): ?>
with:
<?php if (isset($content['taxonomy_forums'])): ?>

That fixes my issues thus far, will keep hunting.

S@ilor’s picture

@ emcniece

Thanks, it's looking promising. Will take a look soon!

Cheers,

nomonstersinme’s picture

Status: Active » Needs review

thanks guys, sorry about that. im pretty sure this is committed to dev and 7.x-1.1 now

nomonstersinme’s picture

Status: Needs review » Closed (fixed)