Forum OpenACS Q&A: Re: Search package with xowiki

Collapse
Posted by Eduardo Santos on
I forgot something. When I edit a page that already had the package_id stored, the new revision loses the package_id, as you presumed.
Collapse
Posted by Gustaf Neumann on
This was a very nasty problem that took me quite a while to find. Apparently, the problem exists only on sites updating since many versions, but not on fresh installs of oacs-5-2 from the repository. The same problem exist(ed) on openacs.org, where i first updated openacs to the latest fixes of openacs 5.2. But this did not help either.

Apparently the long running sites have "only" 4 versions of content_revision__new (do a \df content_revision__new), while new installs have 7.

To fix the problem, source from psql packages/acs-content-repository/sql/postgresql/content-revision.sql
and ignore the errors at the end. Do one more ::xowiki::fix_all_package_ids, and you are set.

It looks as if there is somewhere a missing update script.

Collapse
Posted by Eduardo Santos on
Thank you very much Gustaf; it seems to work right now. Aparently you are right about the missing upgrade script, but I couldn't find any new definition for the function content_revision__new in any of the upgrades. I tried to see if in some of the revisions for the file content-revision.sql somebody put more definitions for the function, and I couldn't find it either. The best thing I found is between the dotlrn 2-2-1 final and the HEAD. You can see the diff:

http://cvs.openacs.org/cvs/openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql?r1=1.45&r2=1.35

I don't think it's related to this bug anyway, but maybe it's worth to take a look. However, sourcing the file seems to solve everything right now. My search is working just fine.