Call to undefined function profile_stats

Started by Dazed, January 12, 2009, 12:19:31 PM

Previous topic - Next topic

Dazed

I am using the 2.0.4 Beta. I am using the Simple portal from here as well.  This does not seem to be theme specific as it shows in the default theme. The board is heavily modified and everything seems to work fine except for getting this error.


Fatal error: Call to undefined function profile_stats() in /home/************/public_html/Sources/Load.php(2231) : eval()'d code on line 1120

It appears that is is a stat problem as the numbers don't seem to add up. When I click on Show Stats in my profile or anyone elses it gives this error. I have looked to see if I could find something obvious in Load.php but see nothing obvious. Is this most likely the file creating the issue or do I need to check someplace else?

If more information is needed let me know.... I also am attaching a couple of screen shots; one of the Stats view and one of the installed mods.


Rumbaar

This is an eval error too, the error might not even be in that file.

You'll have to disable template eval temporarily to get the real file and error line.

To do this, run this query in PHPmyAdmin (What is phpMyAdmin?)
INSERT INTO smf_settings VALUES ('disableTemplateEval', 1);
Once that's done, get the error again and copy it (the file and line may have changed), then run this query to re-enable it:
DELETE FROM smf_settings WHERE variable = 'disableTemplateEval';

When did it first start happening?  When was it working last?

Also the function profile_stats() isn't part of the base install of SMF 2.0 BETA 4.  So not sure what mod from that list that would add it.  Though you've hidden two.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Dazed

First; The 2 blocked out have not been installed so I just covered them up to remove them as being considered as part of the problem.

Second; after running the query as suggested, I get:

Fatal error: Call to undefined function profile_stats() in /home/********/public_html/Themes/default/Profile.template.php on line 1120

The offending part seems to be in the section below...

// Draw a bar for every board.
foreach ($context['board_activity'] as $activity)
{
echo '
<tr>
<td width="60%" valign="top">', $activity['link'], '</td>
<td width="20%" valign="top">', $activity['percent'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $activity['relative_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="top">', $activity['percent'], '%</td>
</tr>';
}
}
echo '
</table>
</td>
</tr>';
profile_stats();
echo'
</table>';
}

// Template for editing profile options.


Sadly I don't really know how long this has been going on as one of our members just pointed it out.

:-\

Kermit

My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Dazed

Quote from: Duncan85 on January 12, 2009, 06:44:09 PM
Please attach your Profile.template.php

Thanks Duncan... I removed the profile_stats(); from the file and it seems fine for now; No idea what put that there... I bounced around doing various things and am not finding any further issues or errors at this time. I will be marking this solved...  8)

Thank you both!  :)

Rumbaar

Yeah, looks like legacy code from a previously un-installed mod?  Had you installed any profile stat related modification.

You might want to close your Help Desk ticket, if you haven't also done so.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Dazed

Quote from: Rumbaar on January 12, 2009, 07:10:02 PM
Yeah, looks like legacy code from a previously un-installed mod?  Had you installed any profile stat related modification.

You might want to close your Help Desk ticket, if you haven't also done so.

Did so but seems related to the award mod. Can not be certain though. I will continue to test to see because I think it is worth the challenge.

Rumbaar

Nope no call to profile_stats(); function in those SMF 2.0 BETA 4 award mods, at least on this site.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Dazed

Ok, well I will go through what I have had installed or attempted.  I did have one error with that one yesterday while I was digging into this issue. It may be the arcade possibly. Maybe thats what made me think it was the other mods fault. No matter its fixed but I sure would like to know what put that there....  ::)

Rumbaar

Yes please do reply when/if you do find out.  I know in search this is the only topic, so if other find it in the future it might help them also.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Advertisement: