[trean] Re: Old bookmarks gone after update/upgrade
Rob Rosenfeld
rosenfeld at alum.mit.edu
Wed Apr 20 20:36:43 PDT 2005
Rob Rosenfeld wrote:
> Rick Emery wrote:
>
>> Quoting Rick Emery <rick at emery.homelinux.net>:
>>
>>
>>
>>> I ran the upgrade scripts (2005-03-15_move_to_horde_share.php and
>>> 2005-03-16_fix_parents.php, in that order) and got my categories back.
>>> But clicking on a category produces the error "Fatal error: Call to a
>>> member function on a non-object in
>>> [path-to-horde]/trean/templates/bookmark/standard.inc on line 3". The
>>> error appears in a white box where the bookmark should be, not at the
>>> top of the page. The horde log shows this error:
>>>
>>>
>>
>
>
> I just upgraded my horde framework, horde and trean to CVS and then
> ran the 03-15 and 03-16 scripts in sequence with no errors. I get the
> same behavior and message as above.
>
>
>> Okay, let me explain how I fixed it, and maybe that will give some
>> insight into what happened in case somebody else is having the problem.
>>
>> I noticed that, after running the upgrade scripts, I had two
>> top-level entries ("Rick Emery's Bookmarks") in the database. Old
>> entries referred to the old root as the parent, and new entries
>> pointed to the new root as the parent. The old categories were
>> producing the error, while newly created categories worked fine. So I
>> restored the datatree tables and, after examining/troubleshooting the
>> first script, decided to comment out the "if" block starting on line
>> 118 ("if (!$datatree->exists($owner)) {"). That prevented the
>> "duplicate" root from being created, and when it finished, all of my
>> bookmarks were there in the correct categories. The only problem was
>> that "Rick Emery's Bookmarks" was at the same level as the other
>> categories and there was no "root". Running the second script
>> ("fix_parents") resolved that issue, and everything is working
>> correctly now.
>>
>>
>>
>
>
> I see the exact same results and behavior as above. Old entries point
> to the old root and new entries appear at the same level as my old
> root bookmark folder. Is Rick's fix above the only way to address it?
>
> I noticed something possibly related. My old root was datatree_id
> 1877 and the new 1878. I have a subset of the records with group_uid
> = horde.shares.trean where datatree_parents = :1877:1878. That seems
> like incorrect syntax from looking at the rest of the entries which
> take a form of :1877:931:932.
>
> Hope this helps figure out what I did wrong or what's wrong still with
> the scripts.
>
>
Has anyone else accomplished this update in a different way? Or
should I just not be upgrading?
More information about the trean
mailing list