Home
The Toolkit for Online Communities
15938 Community Members, 0 members online, 2231 visitors today
Log In Register

Forum .LRN Q&A: Attachments problem and fix

OpenACS Home : Forums : .LRN Q&A : Attachments problem and fix

Icon of Envelope Request notifications

+
Posted by Deds Castillo on
The current CVS checkout of attachments contains a query file named www/index.xql. The problem arises when you have several attachments for a single object. The page will barf with a "query returned too many rows". Fix would be to choose the appropriate attachment on query. So we change:

select live_revision from cr_items, attachments where cr_items.item_id = attachments.item_id and attachments.object_id = :object_id

to:

select live_revision from cr_items, attachments where cr_items.item_id = attachments.item_id and attachments.object_id = :object_id and attachments.item_id = :attachment_id

+
Posted by Don Baccus on
Looks like a good catch and the correct fix, good job!
+
Posted by Arjun Sanyal on
deds: patch applied. thank you!