In PrintPage parsebbc gets no info about the processed post id.
Add id_msg to selected fields in query and
$context['posts'] = array();
while ($row = wesql::fetch_assoc($request))
{
// Censor the subject and message.
censorText($row['subject']);
censorText($row['body']);
$context['posts'][] = array(
'subject' => $row['subject'],
'member' => $row['poster_name'],
'on_time' => on_timeformat($row['poster_time'], false),
'timestamp' => $row['poster_time'],
'body' => parse_bbc($row['body'], 'post', array('print' => true)),
);
if (!isset($context['topic_subject']))
$context['topic_subject'] = $row['subject'];
}
'body' => parse_bbc($row['body'], 'post', array('print' => true, 'cache' => $row['id_msg'])),