Various errors after enabling the module
crea - July 11, 2008 - 19:07
| Project: | Big Autocomplete TAXonomy |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
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.

#1
Try version 1.1
#2
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
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
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
These are all fixed in the latest 6 version
#8