[turba] "requested object not found" after upgrade from 1.1 to 2.2

Giacomo Di Ciocco admin at nectarine.info
Mon Jul 7 22:08:38 UTC 2008


Otto Stolz ha scritto:
> I just wanted to point out that you have to apply to your database
> the upgrade script, as discussed in the UPGRADE doc file. Failure of
> doing so would probably result in the symptoms you have described.
>
> Another possible problem is discussed in
> <http://wiki.horde.org/FAQ/Admin/Troubleshoot/Turba#toc4>.
>
> Good luck,
>   Otto Stolz
>
Ciao Otto,
thank you for your reply, i think that the problem is in 
turba_shares.share_owner and turba_shares_users.user_uid length;
update script uses VARCHAR(32) for both but turba_objects.owner_id is 
VARCHAR(255) so they cant match with long user at domain.


I made a tcl script to fix these problems on my db but it will still 
keep zombies in turba_shares and turba_shares_users,
they are those who dont have any record in turba_objects.
Plus it will make troubles with similar accounts that differ over the 
32th character only.

It is here only as an example, DO NOT USE IT.

Reagrds,
Giacomo.


#!/usr/bin/tclsh
load /lib/fbsql.so

sql connect 127.0.0.1 user password
sql selectdb horde

foreach owner_id [sql "SELECT owner_id from turba_objects"] {
        set users($owner_id) $owner_id
}

foreach user [array names users] {
        set username $users($user)
        foreach user_uid [sql "SELECT user_uid from turba_shares_users"] {
                set tr_user_uid [lindex $user_uid 0]
                if {[string match "$tr_user_uid*" $username ]} {
                        sql "update turba_shares_users set user_uid = 
\'$username\' where user_uid = \'$tr_user_uid\'"
#                       puts "$tr_user_uid $username"
                }
        }
        foreach share_owner [sql "SELECT share_owner from turba_shares"] {
                set tr_share_owner [lindex $share_owner 0]
                if {[string match "$tr_share_owner*" $username ]} {
                        sql "update turba_shares set share_owner = 
\'$username\' where share_owner = \'$tr_share_owner\'"
#                        puts "$tr_share_owner $username"
                }
        }

        set uniqid [lindex [sql "select share_id from turba_shares where 
share_owner = \'$username\' limit 1"] 0]

        if {$uniqid != ""} {
                sql "delete from turba_shares_users where user_uid = 
\'$username\' and share_id != \'$uniqid\'"
                sql "delete from turba_shares where share_owner = 
\'$username\' and share_id != \'$uniqid\'"
        }


}

sql disconnect



More information about the turba mailing list