Forum OpenACS Development: CR problem with "title" column

Collapse
Posted by Eduardo Pérez on
I have this problem when using the CR (TCL API):
Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  column "title" duplicated
CONTEXT:  PL/pgSQL function "content_type__refresh_view" line 53 at execute statement
PL/pgSQL function "content_type__create_type" line 54 at perform

SQL:

        select content_type__create_type('as_assessments','content_revision','Assessment Assessment','Assessment Assessments','as_assessments','assessment_id',NULL)

This is the code:
content::type::create_type -content_type {as_assessments} -supertype {content_revision} -pretty_name {Assessment Assessment} -pretty_plural {Assessment Assessments} -table_name {as_assessments} -id_column {assessment_id}

and the table doesn't contain any title column.

Collapse
Posted by Dave Bauer on
I figured this out.

On HEAD the acs_objects table has a title column. The code that creates the cr_revisionsi and cr_revisionsX views does not take this into account.

I am not sure how to fix it yet.

Collapse
Posted by Dave Bauer on
This is already fixed on HEAD. Make sure you have the latest version.
Collapse
Posted by Eduardo Pérez on
OK, I resourced:
acs-content-repository/sql/postgresql/content-type.sql
and now it's working.