The current template does not get the revision_id from the query string. The template below does that.
file-storage-default.tcl
# Put the current revision's attributes in a onerow datasource named "content".
# The detected content type is "content_revision".
set revision_id [ lindex [ split [ ad_conn query ] = ] 1]
content::get_content content_revision
if { ![string equal -length 4 "text" $content(mime_type)] } {
# It's a file.
if { [string equal $revision_id ""]} {
cr_write_content -revision_id $content(revision_id)
} else {
cr_write_content -revision_id $revision_id
}
ad_script_abort
}
# Ordinary text/* mime type.
template::util::array_to_vars content
set text [cr_write_content -string -revision_id $revision_id]
if { ![string equal "text/html" $content(mime_type)] } {
set text [ad_html_text_convert -from $mime_type -to text/html $text]
}
set context [list $title]
ad_return_template