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
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

sdrycroft - July 14, 2008 - 11:23

Try version 1.1

#2

sdrycroft - July 14, 2008 - 15:51
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

crea - July 15, 2008 - 20:16
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

Break9 - September 20, 2008 - 21:43

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

#5

Break9 - September 20, 2008 - 21:47

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

#6

Kars-T - November 13, 2008 - 10:52
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

sdrycroft - January 23, 2009 - 12:29
Status:needs review» fixed

These are all fixed in the latest 6 version

#8

sdrycroft - February 4, 2009 - 12:11
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.