I recently installed Primary term 6.x-1.0 and whenever I post content I get the following errors:

warning: Illegal offset type in isset or empty in /sites/all/modules/primary_term/primary_term.module on line 38.
warning: Illegal offset type in isset or empty in /modules/taxonomy/taxonomy.module on line 1023.
warning: Illegal offset type in /modules/taxonomy/taxonomy.module on line 1024.
warning: Illegal offset type in /modules/taxonomy/taxonomy.module on line 1027.
warning: Illegal offset type in isset or empty in /modules/taxonomy/taxonomy.module on line 1023.
warning: Illegal offset type in /modules/taxonomy/taxonomy.module on line 1024.
warning: Illegal offset type in /modules/taxonomy/taxonomy.module on line 1027.

Now, in my Story content type I have only one vocabulary selected for Primary term. This means that when I create content I have a Primary term dropdown with nothing to select.

Comments

sethcohn’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Looking at the code in question:

 	 if (!empty($node->primaryterm)) {
 	$tid = $node->primaryterm;
 	} else if (!empty($node->primary_term)) {
 	$tid = $node->primary_term->tid;
 	}
 	if (!empty($tid)) {
 	foreach ($node->taxonomy as $k => $v) {
 	if (is_array($v) && !empty($v[$tid])) {  // line 38
 	return; 

Something is being set for primary term, or you wouldn't be hitting line 38 in the first place.
and then something is up with the $node->taxonomy being invalid.

Need more info here. Other modules you are using? How many terms (if any) are in your vocabulary?

brianV’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing. It's been 6 months, and massive code changes in the meantime.