Closed (works as designed)
Project:
Extra Voting Forms
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Jan 2009 at 17:18 UTC
Updated:
9 Jan 2009 at 17:18 UTC
Hi all,
I had an issue earlier today when implementing User Karma/EVF to output Karma Points using Advanced Forums in the Author Pane. I've themed everything to my desire, however when I manually output the points I received a warning.
* warning: Attempt to assign property of non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sites\all\modules\extra_voting_forms\extra_voting_forms.module on line 1044.
* warning: Attempt to assign property of non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sites\all\modules\extra_voting_forms\extra_voting_forms.module on line 1045.
In troubleshooting the problem, I found that the extra_voting_forms_show_form() function is looking for CID, however the actual forum topic node doesn't have a CID. To resolve this I just put a simple condition statement to check for the existence of the CID.
<?php if ($comment->cid) : ?> <span id="vote"> Vote: </span> <?php print extra_voting_forms_show_form($comment,'c', 3) ?> <?php endif; ?>
Not sure if anyone else has had this issue but just in case I wanted to share my quick fix.
Thanks for the very cool mod!!