Project:Big Autocomplete TAXonomy
Version:5.x-1.1
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

After enabling this module, at node ( with big taxonomy vocab. attached) edit page I get drupal warning:

warning: preg_match() expects parameter 2 to be string, array given in bootstrap.inc on line 670

At the same time, at another node ( without taxonomy attached at all ) edit page I get:

warning: Invalid argument supplied for foreach() in batax.module on line 46.

Comments

#1

Try version 1.1

#2

Priority:critical» minor

Christ, just noticed this was labelled as "critical" - WTF? Crea, really, both the errors you posted are PHP Warnings, which straight away would make this problem minor.

#3

Version:5.x-1.0» 5.x-1.1

My mistake with priority.

I tried 1.1, warnings at node edit disappeared, but I get another warning after I submit different node types:

warning: Invalid argument supplied for foreach() in batax.module on line 81.

Strange that this warning is printed only at first node view and disappears at following ones

#4

I have the same issue.... any actual fix?

#5

i rolled back the version and it didn't fix the issues

#6

Status:active» needs review

I have an error like this in line105.
It seems that a node without linked taxonomy will generate the error. So I added an check "if(!empty($node->taxonomy)){" and the error should go away.

<?php
function batax_nodeapi(&$node, $op, $three, $four){
  switch(
$op){
    case
'submit':

      if(!empty(
$node->taxonomy)){

        foreach(
$node->taxonomy as $vocabulary => $vocabulary_field){
          if(
substr($vocabulary,-4) == '-new'){
           
$vid = array_shift(explode("-",$vocabulary));
           
$node->taxonomy[$vid] = _split_field($vocabulary_field, $vid);
          }
        }

      }

      break;
  }
}
?>

#7

Status:needs review» fixed

These are all fixed in the latest 6 version

#8

Status:fixed» closed (fixed)
nobody click here