[turba] Turba upgrade problems fixed

Jan Schneider jan at horde.org
Tue Apr 1 07:39:21 UTC 2008


Zitat von Paul van der Vlis <paul at vandervlis.nl>:

> Otherwise I saw this kind of errors in /var/log/horde/horde.log :
>
> Mar 31 12:36:41 HORDE [error] [turba] DB Error: no such field: SELECT
> object_id, owner_id, object_type, object_members, object_uid,
> object_name, object_email, object_alias, object_homeaddress,
> object_workaddress, object_homephone, object_workphone,
> object_cellphone, object_fax, object_title, object_company,
> object_notes, object_pgppublickey, object_smimepublickey,
> object_freebusyurl FROM turba_objects WHERE
> (owner_id = 'gs' AND (LOWER(object_name) LIKE LOWER('%%')))
> [nativecode=1054 ** Unknown column 'object_type' in 'field list'] [on
> line 126 of "/usr/share/horde3/turba/lib/Driver/sql.php"]

Then you didn't update from a stock Turba install. The object_type  
column has been there since ages.

>>> This was the problem:
>>>
>>> elo2:/usr/share/horde3/turba/lib# php
>>> /usr/share/doc/turba2/examples/scripts/upgrades/create_default_histories.php
>>>
>>> Notice: Undefined index:   in
>>> /usr/share/doc/turba2/examples/scripts/upgrades/create_default_histories.php
>>> on line 69
>>
>> I don't see anything in this line that could cause this warning,
>> because we only *set* array indices there. Try what I just committed,
>> anyway.
>
> It's about what is missing.
> After "Undefined index: " there must be something, I guess 'localsql'.

There still isn't any read access to a variable index that could be  
empty, in this place.

>>> Creating default histories for localsql ...
>>>
>>> Notice: Undefined index:  type in /usr/share/horde3/turba/lib/Driver.php
>>> on line 1075
>>>
>>> Warning:
>>> Turba_Driver::include_once(/usr/share/horde3/turba/lib/Driver/.php):
>>> failed to open stream: No such file or directory in
>>> /usr/share/horde3/turba/lib/Driver.php on line 1076
>>
>> No recent version of Turba calls include_once anywhere near this line.
>
> I am using Turba version 2.1.3, what comes with Debian Etch.
>
> ---------------------
>     function &factory($name, $config)
>     {
>         $class = basename($config['type']);    #line 1075
>         include_once dirname(__FILE__) . '/Driver/' . $class . '.php';
>         $class = 'Turba_Driver_' . $class;
> ------------------

As far as I can see this could only happen if $sources doesn't contain  
an address book array in the upgrade script.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the turba mailing list