Forum OpenACS Q&A: Bookshelf error on 5.2.3b1 and postgres site

Can someone tell me what's wrong here? Am I suffering from a too new version of Postgres? or... This happens anytime I try to add a book to the bookshelf. Thanx....
Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  column "p_context_id" does not exist
CONTEXT:  PL/pgSQL function "bookshelf_book__new" line 28 at assignment

SQL: 

	select bookshelf_book__new('3512','bookshelf_book','2735','1425924166','-','A Psychological Guide to a Mature Faith: Books: Walter Kania',NULL,NULL,NULL,NULL,NULL,'draft','queue',NULL,'496','65.40.137.57')

      
    while executing
"ns_pg_bind 0or1row nsdb0 {

	select bookshelf_book__new(:book_id,'bookshelf_book',:package_id,:isbn,:book_author,:book_title,:main_entry,:main_entry_m..."
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
    ("postgresql" arm line 2)
    invoked from within
"switch $driverkey {
                oracle {
                    return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
                }
       ..."
    invoked from within
"db_exec 0or1row $db $full_statement_name $sql"
    invoked from within
"if {[regexp -nocase -- {^\s*select} $test_sql match]} {
                # ns_log Debug "PLPGSQL: bypassed anon function"
                set selection..."
    ("uplevel" body line 6)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle -dbn $dbn db {
            # plsql calls that are simple selects bypass the plpgsql 
            # mechanism for creating anonymous fun..."
    (procedure "db_exec_plsql" line 57)
    invoked from within
"db_exec_plsql create_object {}"
    (procedure "package_instantiate_object" line 113)
    invoked from within
"package_instantiate_object -extra_vars $extra_vars bookshelf_book"
    (procedure "bookshelf::book::new" line 15)
    invoked from within
"bookshelf::book::new  -book_id $book_id  -isbn $isbn  -book_author $book_author  -book_title $book_title  -main_entry [template::util::richtext::get_p..."
    ("uplevel" body line 2)
    invoked from within
"uplevel #$level $new_data"
    ("1" arm line 598)
    invoked from within
"switch $errno {
                    0 {
                        # TCL_OK
                    }
                    1 {
                        # TCL_E..."
    (procedure "ad_form" line 612)
    invoked from within
"ad_form -name book -form {
    book_id:key(acs_object_id_seq)
    {isbn:text {label "ISBN"} {after_html {(<a href="j a v a s c r i p t:isbn_update();">update i..."
    ("uplevel" body line 38)
    invoked from within
"uplevel {
    	  ad_page_contract {
    Add or edit a book.

    @creation-date 2002-09-08
    @author Lars Pind (lars@pinds.com)
    @cvs-id $Id: boo..."
    (procedure "code::tcl::/var/lib/aolserver/allsouls/packages/bookshelf/ww..." line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 5)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
                $handler
            } ad_script_abort val {
                # do nothing
            }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
            rp_serve_abstract_file "$root/$path"
            set tcl_url2file([ad_conn url]) [ad_conn file]
            set tcl_url2path_info..."
Collapse
Posted by Michael Steigman on
This looks like a pretty trivial bug. I just commited a small fix and upped the version to 0.4d3 on HEAD. If the repository is still rebuilt nightly, you can try to upgrade tomorrow from the repository and let me know if it's fixed. You can also check out the package from HEAD if you want to try it now.
Collapse
Posted by Bill Millikin on
Thanx, Michael:

Well, I checked out the new version and moved it into my acs packages directory on my site, changing the file permissions to match the site.

The installation said that openacs-core v 5.2.3 is required. That is the version I'm running.

So - I removed that requires statement from the .info file, and.........

I tried to install again, and I can no longer install anything, because psql cannot be executed do to permission denied.

I've not changed (I know - that doesn't mean I didn't) any other permissions anywhere.

So - I went to try installing xowiki and it wants the version of xotcl-core that is already installed. Won't go..

I tried a couple of other packages and they all blow up because psql cannot be done because permission denied.

Big question is - what/where can I look to find what went awry.

The actual site works just fine, btw.

Help?

Thanx!