Pardon me, but the line that throws the error is: $c->log->debug($document->template->document_class($document->template_id)); I am definitely passing the value. Amiri