Page 1 of 1

Problem with rateThis admin panel in 1.6.6 (SOLVED)

Posted: Thu Nov 12, 2009 11:01 am
by palaueb
Hi, I got this error when I enter the admin panel for rateThis module:

[12-Nov-2009 11:46:58] PHP Fatal error: 
Call to a member function getContent() on a non-object in
/usr/home/xxxxxxxxxxxxxxx/web/modules/RateThis/function.ratingsTab.php on line 39

Well, the solution that works for me whas edit that file and edit this code:

Code: Select all

$hm = $gCms->GetHierarchyManager();
$node = $hm->getNodeById($row['pageID']);
$content =& $node->getContent();
if ($content != null) //Just in case
{
     $pageTitle=$content->Name();
}
for this one:

Code: Select all

$hm = $gCms->GetHierarchyManager();
$node = $hm->getNodeById($row['pageID']);
if($node != null){
$content =& $node->getContent();
if ($content != null) //Just in case
{
     $pageTitle=$content->Name();
}
}//node diff null
Hope it helps

Re: Problem with rateThis admin panel in 1.6.6 (SOLVED)

Posted: Thu Nov 12, 2009 12:52 pm
by scooper
Ah - had you deleted a page with ratings on or something?

Good find anyway, I'll add it into svn. Thanks for letting us know.

Just as a general point, there are a couple of newer Ratings modules in the forge as well, development on this one is er slow at best.

Cheers.

s.

Re: Problem with rateThis admin panel in 1.6.6 (SOLVED)

Posted: Tue Dec 22, 2009 9:31 am
by palaueb
scooper, thanks for your reply.

I use this for it's simplicity, I just want to eval the page and got a list of votes, without any other content.

For me it's OK :)
thanks again!

Re: Problem with rateThis admin panel in 1.6.6 (SOLVED)

Posted: Tue Feb 02, 2010 5:24 am
by ESBertrand
Just FYI, I ran into this same error when trying to access a private page when not logged on (using FrontEndUsers and the CustomContent module).  The error pointed to a nearly exact copy of the above function, but in /lib/misc.functions.php, so I made the same code fix and the problem no longer occurs.  However, at this moment the redirect isn't working (hoping that's something else....).

Erik