MyBB Community Forums

Full Version: MyProfile Error! Please Help.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys.
I have a problem with MyProfile Plugin!! i have code but can't fix that!!
The MyProfile plugin is integration with my alert. now problem is when i visit forum as member not problem. but if i visit as guest, show this error:

 Fatal error: Call to a member function registerFormatter() on a non-object in *** plugins\myprofile\myprofilecomments.class.php on line 990


Error is in line 990. And now line 990 is:


  $formatterManager->registerFormatter(new MyProfileCommentsMyAlertsFormatter($mybb, $lang, MyProfileCommentsMyAlertsFormatter::alert_type_code()));

Can anyone fix this code??
This very important because forum not load for guests now!!
Thanks.
Not anybody to help me here??
This is important .. please help me Confused
Ya. I tried using MyProfile. It conflicts with MyAlerts.

The creator of the MyProfile plugin is aware of this. Currently there's no fix.
temporary workaround :
~/inc/plugins/myprofile/myprofilecomments.class.php
edit by using advanced editor like notepad++ or through file manager at web host panel

find a comment at line 986 - after it in a new line add
if ($mybb->user["uid"] > 0){

after a few lines (9 lines) find below code
public function global_intermediate() {
before that code, in a blank line add
}
save the file (with utf encoding without BoM) and check if it works
kindly looking for a solution aswell Smile
this plugin is awesome, I hope the conflict with myalerts will be resolved!
Did any of you try what .m. suggested?
this works! tried and tested Wink