Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How do I display the latest comment per discussion on the front page?
I tried adding:
$Comment = $this->Context->ObjectFactory->NewContextObject($this->Context, 'Comment');
echo $Comment->Body;
within the loop of the file vanilla/themes/MyTheme/discussion.php, but I am getting all sorts of errors.
Any suggestions on how to display the latest comment per discussion thread?
Thanks!
$Comment = $this->Context->ObjectFactory->NewContextObject($this->Context, 'Comment');
echo $Comment->Body;
within the loop of the file vanilla/themes/MyTheme/discussion.php, but I am getting all sorts of errors.
Any suggestions on how to display the latest comment per discussion thread?
Thanks!
0
Comments
Notice: Undefined index: LUM_Comment in /var/www/vhosts/default/htdocs/vanilla/library/Framework/Framework.Functions.php on line 601 Notice: Undefined index: LUM_Comment in /var/www/vhosts/default/htdocs/vanilla/library/Framework/Framework.Class.SqlBuilder.php on line 357 Notice: Undefined index: LUM_Comment in /var/www/vhosts/default/htdocs/vanilla/library/Framework/Framework.Class.SqlBuilder.php on line 600 Notice: Undefined index: DiscussionID in /var/www/vhosts/default/htdocs/vanilla/library/Framework/Framework.Class.SqlBuilder.php on line 601 Notice: Undefined index: in /var/www/vhosts/default/htdocs/vanilla/library/Framework/Framework.Class.SqlBuilder.php on line 601
A fatal, non-recoverable error has occurred
Technical information (for support personel):
Error Message
An error occurred while fetching body field.
Affected Elements
SenderObject.SenderMethod();
The error occurred on or near: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS "Body" FROM LUM_ LUM_Comment WHERE LUM_Comment. = 'DiscussionID.'' at line 1
For additional support documentation, visit the Lussumo Documentation website at: lussumo.com/docs
Any idea what the problem is here?
So I copied discussion.php from "applications\vanilla\views\post" to "themes\myTheme" -- modified the php, and ... nothing changed. The standard one gets loaded.
Do I have to enable it somewhere?