Forum OpenACS Q&A: Problem with weblogger since 5.1 upgrade

I've just upgraded from 5.0.4 to 5.1 and get the following error when I try to view my weblog pages.

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

ERROR:  Attribute "posted_date" not found

SQL: 
                    select entry_id,
                           to_char(entry_date, 'fmDayfm, Month fmDDfm, YYYY') as entry_date_pretty, 
                           to_char(entry_date, 'YYYY/MM/DD/') as entry_archive_url,
                           to_char(entry_date, 'YYYY-MM-DD') as entry_date,
                           title,
                           title_url,
                           category_id,
                           content,
                           content_format,
                           draft_p,
                           p.first_names as poster_first_names,
                           p.last_name as poster_last_name,
                           o.creation_user as user_id,
                           to_char(posted_date , 'HH24:MI') as posted_time_pretty,
                           to_char(e.entry_date , 'YYYY-MM-DD ')||to_char(e.posted_date , 'HH24:MI:SS') as entry_date_ansi,
                           to_char(current_timestamp,'YYYY-MM-DD HH24:MI:SS') as sysdate_ansi,
                           (select count(gc.comment_id) 
                            from general_comments gc, cr_revisions cr 
                            where gc.object_id = entry_id
                            and   content_item__get_live_revision(gc.comment_id) = cr.revision_id) as num_comments
                    from   pinds_blog_entries e join 
                           acs_objects o on (o.object_id = e.entry_id) join 
                           persons p on (p.person_id = o.creation_user)
                    where  package_id = '1367'
                    and    
                        date_trunc('month', entry_date) = '2003-12-01'
                
                    and    draft_p = 'f'
                    and    deleted_p = 'f'
                    order  by entry_date desc, posted_date desc
                    
        
    while executing
"ns_pg_bind select nsdb0 {
                    select entry_id,
                           to_char(entry_date, 'fmDayfm, Month fmDDfm, YYYY') as entry_date_pretty, 
                           t..."
Collapse
Posted by Jade Rubick on
James, since nobody has answered this yet, I would suggest also posting this bug on the bug-tracker, with a reference to this thread.

Is lars-blogger tagged with the openacs-5-1-compat tag? If so, it probably shouldn't be. I also ran into problems when I upgraded.

Collapse
Posted by Lars Pind on
James,

Is this the weblogger-portlet? Because that did have this bug, which I have just fixed on oacs-5-1 branch.

lars-blogger itself shouldn't have.

What's happened is that entry_date and posted_date has been replaced with a single entry_date, which is much more sane. All references to posted_date should've been replaced with entry_date already.

/Lars