Forum OpenACS Development: Problems with content::item::new and content::revision::new

When I use the functions content::item::new and content::revision::new, i don't send the date and I obtain the following error:

ORA-01400: cannot insert NULL into ("GESDEV"."ACS_OBJECTS"."CREATION_DATE")
ORA-06512: at "GESDEV.ACS_OBJECT", line 68
ORA-06512: at "GESDEV.CONTENT_ITEM", line 153
ORA-06512: at line 4

SQL: [too long]
while executing
"ns_ora exec_plsql_bind nsdb0 {

BEGIN
:1 := content_item.new(name => :name,
paren..."

but I send the date it works correctly, but the function content::folder:new and content::template::new dont send the date.

This is fixed on the oacs-5-1 branch and has been for a while. If you are using HEAD you might need to port the changes over. I will try to do that later today.
The param package_id not defined in the fucntion content::template::new

ad_proc -public content::template::new {
-name:required
{-text ""}
{-parent_id ""}
{-is_live ""}
{-template_id ""}
-creation_date
{-creation_user ""}
{-creation_ip ""}
}

and it must be defined

ad_proc -public content::template::new {
-name:required
{-text ""}
{-parent_id ""}
{-is_live ""}
{-template_id ""}
-creation_date
{-creation_user ""}
{-creation_ip ""}
{-package_id ""}
}

so that it works correctly

thanks dave

Please provide ALL details if you insist of posting bug reports on the forums. Details include:

Version of OpenACS you are using.
A example of the code that was called.
A description of what you expected to happen.
A description of what actually happened including the relevant part of the error log.

On OpenACS 5.1 content::template::new does NOT accept a package_id parameter. This is because there is no package_id attribute for content repository items in this version of OpenACS. The first version of OpenACS that will support package_id for all objects in the acs_objects table is OpenACS 5.2 (current CVS HEAD).

Collapse
Posted by César Alexander Hernández Juarez on
I am working with oacs-5.1 and dotLRN with package evaluation.

My problem is the next:

In the acs-content-repository in postgres exist the funcion: function
content_revision__get_content() but in oracle don't exist.

Perhaps in Oracle one works different and it is not necessary to create
it.

for your help, thanks dave.

Collapse
Posted by Dave Bauer on
Can you explain what the actual problem is? What does this function do? And what should the equvilant oracle function do?

This might be tricky due to differences binary object handling in PG compared to oracle.