Forum OpenACS Development: Re: xowiki 0.20

Collapse
22: Re: xowiki 0.20 (response to 1)
Posted by Dave Bauer on
Gustaf,

I was no able to resolve the issue with package_id but I worked around it

Changed in Page instproc render

set package_id [db_string q "select package_id from acs_objects where obj\ect_id=:parent_id" -default ""]
# set package_id [$parent_id set package_id]

and in www/portlets/categories.tcl

the same kind of change. Now its more or less working :)

Al;so we notice to Xinha editor isn't coming up. I didn't see any javascript erros and I haven't had time to debug it yet.

Thanks for the great work improving xowiki!

Collapse
23: Re: Re: xowiki 0.20 (response to 22)
Posted by Gustaf Neumann on
Dave,

The real problem with xowiki on openacs.org seems that it is not possible to create items derived from ::xowiki::Page. if you try to add a new "xowiki plain page" there, you see the same message as showing up with the folder object:

Database operation "dml" failed (exception ERROR, "ERROR: insert or update on table "xowiki_plain_page" violates foreign key constraint "xowiki_plain_page_ppage_id_fkey" DETAIL: Key (ppage_id)=(395917) is not present in table "xowiki_page". ")

The same happens, when trying to create page templates. Here is the type hierarchy of the pages.

      object_type       |      supertype
------------------------+---------------------
 ::xowiki::Page         | content_revision
 ::xowiki::PlainPage    | ::xowiki::Page
 ::xowiki::PageInstance | ::xowiki::Page
 ::xowiki::PageTemplate | ::xowiki::Page
 ::xowiki::Object       | ::xowiki::PlainPage
An insert with content_item__new into with a object_type of e.g. ::xowiki::PlainPage is supposed to insert into xowiki_plain_page and xowiki_page. This works normally nicely, but seems to fail on openacs.org (interpreting the above error message). The same thing happens, when xowiki tries to create the directory object (of type xowiki::Object), which makes under normal conditions an entry in xowiki_object, xowiki_plain_page and xowiki_page. This was the place, where the error popped up.

Either there is something seriously wrong with the handling of derived types in the CR on openacs.org, or something went wrong already with earlier installations of xowiki.

Since you have only ::xowiki::Page objects so far, before digging into the details, i would recommend to go to the admin interface xowiki/admin and delete there the types for Object, PlainPage, PageInstance and PageTemplate. If you can delete these, reload xowiki from apm, and the types should be recreated magically.

If something is seriously wrong with derived types in the CR, this won't help either, but maybe something went wrong with the definiton of e.g. PlainPage in earlier installations....

oncerning xinha: by looking into the HTML source of an edit page from openacs.org, i see that the xinha javascript is not included in the edit pages. didn't you set the "htmlarea_p" to 1 in the oacs.org installation of xowiki (since the global UseHtmlAreaForRichtextP is not set?)

Hope, this helps...