Forum OpenACS Q&A: Problem with Ybos Content Management System

Hi to all.

While looking at Ybos CMS, in the cm_defs.tcl file y found the following sql (this is supposed to get the list of documents to show in the index of a section):
    select f.file_id, f.descr, f.owner_id as author_id,
    u.first_names, u.last_name, f.file_title
    from cm_file_content_map m, users u, cm_files f
    where f.file_id = m.file_id
    and u.user_id = f.owner_id
    and m.section_id = '$section_id'
    and exists (select version_id from cm_versions v, cm_files f
    where v.file_id = f.file_id
    and available_p = 't')
    order by upper(f.file_title)

The problem is that the nested sql is not linked to the outer one (so , the resulting logic is: "and exists at least one version of some file with available_p=t"). Changing the inner sql to
    (select version_id from cm_versions v, cm_files f
    where v.file_id = f.file_id
    and v.file_id = m.file_id
    and available_p = 't')
seems to work better.

Saludos,

Jorge
Collapse
Posted by Don Baccus on
You might try e-mailing Ybos directly.  They know the most about it and I'm not sure how often they monitor this forum.