Forum OpenACS CMS: (from a newbie) Forgetful glossary...

Request notifications

I apologize in advance because i feel that i might be reporting on
some basic issue. Anyway...

I've created a glossary associated to a 'term-go-live' workflow.
Freshly created terms/definitions actually go live instantaneously on
the glossary but sort of magically disappear the day after. They are
still accessible from the CMS, and the latter states them as both
published and publishable... But I haven't find the way to just keep
them (a)live in the glossary!

Does that ring a bell to anyone?

Cheers,

Eric

Collapse
Posted by Ola Hansson on
Hi Eric,

The query that pulls the items from the db is wrong in both PG and Oracle.

This is the oracle version:
db_multirow glossary_term_item glossary_term_items_select {
    select i.item_id as glossary_term_item_id , title as term,
    decode(acs_permission.permission_p(i.item_id,
                                       :user_id,
                                       'glossary_term_modify'),
           't', 1,
           'f', 0) as term_edit_p
    from glossary_termsx gt, cr_items i, cr_child_rels ch
    where ch.parent_id = :item_id
    and ch.child_id = gt.item_id
    and i.publish_status = 'live'
    and i.content_type = 'glossary_term'
    and i.live_revision = gt.revision_id
   and publish_date > sysdate -1
    and publish_date < sysdate
    and acs_permission.permission_p(i.item_id, :user_id, 'read') = 't'
    order by term
}
The marked line should read: "and publish_date < sysdate", i.e., < insead of > and without -1

A big patch that fixes this (at least for PG) and more is posted here.

Hope this helps.