Forum .LRN Q&A: Course Creation Error "content" or "body", that is the question.

I'm having a little trouble creating courses in a recently upgraded 2.0.8 to 2.1 Dotlrn and am getting two different error messages:

ERROR: Relation "static_portal_content" has no column "content"
SQL:
select static_portal_content_item__new(
'72368',
'Class Info',
'Class Info'
);

ERROR: Attribute "body" not found
SQL:
select body
from static_portal_content
where content_id = '1723'

Has anyone run into this or might someone offer a troubleshooting tip? Thanks!

Hi Bruce,

Did you post it as a bug into bug-tracker?

It seems the current upgrade for static-portlet changes column name in static_portal_content from "content" to "body" (see http://cvs.openacs.org/cvs/openacs-4/packages/static-portlet/sql/postgresql/upgrade/upgrade-2.0.3d1-2.0.3d2.sql?rev=1.2&view=markup)

Take a look at your static_portal_content table, please. If there is a column "body" it seems to be upgraded. If not maybe you could run packages/static-portlet/sql/postgresql/upgrade/upgrade-2.0.3d1-2.0.3d2.sql by hand (see bug #2129 in bug-tracker)

Anyway, the problem you are reporting seems to be related with packages/static-portlet/tcl/static-portal-content-procs.tcl

this patch could help you:

--- static-portlet/tcl/static-portal-content-procs.tcl.orig 2005-04-06 16:59:04.000000000 -0300
+++ static-portlet/tcl/static-portal-content-procs.tcl 2005-04-06 16:59:46.000000000 -0300
@@ -211,11 +211,7 @@
} {
Get the content of the item
} {
- return [db_string get_content.select {
- select content
- from static_portal_content
- where content_id = :content_id
- }]
+ return [db_string get_content.select {}]
}

ad_proc -public get_package_id {

I fixed Bruce's bug by removing all occurences of "body" and replacing it with content. As Orzenil noted, there's contradictory column names.

Who's maintaining this package? It's a key package for .LRN and this is certainly a critical bug, which should be fixed asap.