Forum OpenACS Q&A: News Package - Can't access admin pages

I installed the News package on a clean database and i have came across the following problem when i try to access the admin pages after inserting a news item (i can access it before the inserting)...

Any ideas? i expected that the package that came with oacs 4.6.3 is all working fine...is it a DB problem?

I've tried select * from news_items_live_or_submitted; but get the same error.

The error i got is listed below:

Request Error

Database operation "select" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  Function round(double precision, integer) does not exist
    Unable to identify a function that satisfies the given argument types
    You may need to add explicit typecasts

SQL:

select
    item_id,
    content_item__get_best_revision(item_id) as revision_id,
    content_revision__get_number(news_id) as revision_no,
    publish_title,
    html_p,
    publish_date,
    archive_date,
    creation_user,
    item_creator,
    package_id,
    status
from
    news_items_live_or_submitted
where
    package_id = '479'
    and status like 'published%'
order by item_id desc

    while executing
"ns_pg_bind select nsdb0 {

select
    item_id,
    content_item__get_best_revision(item_id) as revision_id,
    content_revision__get_number(new..."
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql"
    invoked from within
"db_exec select $db $full_statement_name $sql"
    invoked from within
"set selection [db_exec select $db $full_statement_name $sql]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle db {
    set selection [db_exec select $db $full_statement_name $sql]
        set local_counter 0

    while { [db_getrow $db $selection] } {..."
    (procedure "db_multirow" line 40)
    invoked from within
"db_multirow news_items itemlist "
select
    item_id,
    content_item.get_best_revision(item_id) as revision_id,
    content_revision.get_number(news..."
    ("uplevel" body line 66)
    invoked from within
"uplevel {
          # /packages/news/www/admin/index.tcl

ad_page_contract {

    Display a list of news items summary for administration

    @author St..."
    (procedure "code::tcl::/web/service2/packages/news/www/admin/index" 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 7)
    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([ad_conn url]) [ad_conn path_inf..."

Collapse
Posted by Jeff Lu on
I think the problem is your using postgres 7.3.
You might want to get some patches from bugtracker.