[trean] Re: Old bookmarks gone after update/upgrade

Rick Emery rick at emery.homelinux.net
Tue Mar 22 10:05:30 PST 2005


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:
>
> "HORDE [error] [trean] DB Error: unknown error: [nativecode=1065 **
> Query was empty] [on line 1151 of
> "[path-to-pear/Horde/DataTree/sql.php"]"

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.

Hope this helps somebody, and thanks for the input Ben.

Rick

-- 
Rick Emery

"When once you have tasted flight, you will forever walk the Earth
with your eyes turned skyward, for there you have been, and there
you will always long to return"
                                              -- Leonardo Da Vinci



More information about the trean mailing list