Forum OpenACS Q&A: Re: myfirstpackage: ERROR: duplicate key violates unique constraint

I think it might be a problem with the documentation (content_type__drop_type). Someone here at work that is doing some self directed training ran into the same problem. Must be this page: https://openacs.org/doc/current/tutorial-database.html

I chatted with Dave briefly about it. He mentioned it could have something to do with a change in the way views work so that they are not getting dropped?

Hi. There is another error someone may run into later on while following the myfirstpackage tutorial. It took me a while to understand what was wrong with it:
Further down at the admin pages section(Advanced topics), you are supposed to add an admin section to the myfirstpackage:

look into the file: index.tcl (admin folder)

ad_page_contract {} {
} -properties {
context_bar
}

set package_id [ad_conn package_id]

permission::require_permission \
-object_id $package_id \
-privilege admin]

set context [list]

set title "Administration"

set parameters_url [export_vars -base "/shared/parameters" {
package_id { return_url [ad_return_url] }
}]

Please look at the permission section. The bracket after
admin should go. This creates problems 'cause the -privilege is not "admin" but "admin]". Most likely the bracket was left there by mistake.

Hope this helps too.

I am sorry, I have to correct myself too:
The privilege should be "admin" and not "admin]"

code should be:
permission::require_permission \
-object_id $package_id \
-privilege admin