- Posts: 16
- Thank you received: 0
Kunena 6.3.0 released
The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3
Question Fatal error: Call..... on Recent/My Discussions & Latest etc
Recent Discussions / My Discussions & Latest Discussions:
Fatal error: Call to undefined method stdClass::getThumbAvatar() in /home/sites/mysite.com/public_html/next/modules/mod_latestmembers/tmpl/default.php on line 21
I have JomSocial enabled (view my profile works ok)
The module mod_kunenalatest works fine also,
Please Log in or Create an account to join the conversation.
you're a lucky man. I wanted to post my reply into some other threads, but they are locked; so I searched similiar cases to post my reply to; now you got a response to your problem within days; not weeks or month like we waited.
There are at least 2 Threads which do describe the same problem:
Template Default-ex - pluss Jomsocial BUG and Blank Page When Module Is Enabled .
At first, why do some users get a "blank page" while others are able to report an error?
Because some PlugIns or Language files contain a "error_reporting(0)"; so there is no error output any more. On a fatal error the output is only a blank page.
At second? Who is the "error owner"?
Nobody knows. There are objects of a class in a place, which should not be there. The change is made in JomSocial core. The JomSocial modules itself do NOT have any problems.
The problem: If Kunena is in JomSocial integration mode (and should therefore show profile avatars and online status etc), the user objects are loaded. Perhaps here is a Pre-Condition for this error.
Originally the object Method CFactory::getUser is responsible (in JomSocial) for getting user informations. To speed up loading, there is a trivial caching concept in this class: if a user id is already loaded, it will not be loaded again.
BUT...
...all users which are loaded for Kunena visualizations are stored in the Cache as StdClass, while they should be a CUser object.
If now mod_hellome comes the way and asks for the current user (certainly using CFactory::getUser()) and the id is already in cache, loaded for Kunena, it is not loaded again and directly returned. But now as StdClass, not CUser.
If then mod_hellome wants to use the isOnline function (or similiar) there is an exception fired, because this function does not exist in StdClass.
I do not know and did not find out, why the user objects are loaded as StdClass; it is mysterious, because the caching array is a function local static array. Perhaps some code gurus of Kunena or Azrul should look on it.
To Solve the problem:
edit the following file:
components/com_community/libraries/core.php
In function "getUser" insert the following code directly above the "if (empty" clause.
The code checks, if there is a cache entry and if so, whether it is of the correct class type. If not, the cache entry is removed; so the original code could do what it should.
Alle things with kunena and JomSocial then will work together and correct.
cap1.
Please Log in or Create an account to join the conversation.
Why do some people get this error and some not?
It depends to the used template. If the modules of JomSocial are loaded before Kunena, the correct object class User object are stored in the cache.
Please Log in or Create an account to join the conversation.
I'm not a coder, just a user, but thanks for your explanation, which after a couple of reads I began to understand.
Ok question 1.
which file do I find this?:
Code:
if (array_key_exists($id, $instances)) {
if (get_class($instances[$id]) != "CUser") {
unset($instances[$id]);
}
}
Question 2:
I'm guessing that this also has something to do with the fact that when Guests click on the name of a poster they get sent to the JomSocial profile page - even though Jomsocial access permissions are set to Registered only?
Hmm a bit of a worry on that
BTW... did you post this on JomSocial?
Please Log in or Create an account to join the conversation.