Keyword

Fatal Error: K2

  • Gerald Moore
  • Gerald Moore's Avatar Topic Author
  • Offline
  • New Member
More
11 years 7 months ago #110312 by Gerald Moore
Fatal Error: K2 was created by Gerald Moore
Please HELP getting the following error when I click [Write for Us] link on my site: accbattles.com/coeds/writer-application.html

Fatal error: Call to a member function getUserProfile() on a non-object in /home/accbattl/public_html/components/com_k2/helpers/utilities.php on line 65

Not a coder but was able to comment out line 65 in the utilities.php and page works but, I lose all of the images from my k2 users profiles

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #110313 by xaoc
Replied by xaoc on topic Re: Fatal Error: K2
can it be, that you use not latest K2 version? if so, update to latest! what you describe is an old bug, which was fixed .

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #110314 by Superkoala
Replied by Superkoala on topic Re: Fatal Error: K2
After restore my website it is not runing.

Fatal error: Class 'K2Model' not found in /var/www/clients/client602/web1221/web/plugins/system/k2/k2.php on line 411

I have also on the mainpage after the update a problem with my slider

Alex

Please Log in or Create an account to join the conversation.

  • Gerald Moore
  • Gerald Moore's Avatar Topic Author
  • Offline
  • New Member
More
11 years 7 months ago #110315 by Gerald Moore
Replied by Gerald Moore on topic Re: Fatal Error: K2
I am using k2 version 2.6.5

Please Log in or Create an account to join the conversation.

  • Gerald Moore
  • Gerald Moore's Avatar Topic Author
  • Offline
  • New Member
More
11 years 7 months ago #110316 by Gerald Moore
Replied by Gerald Moore on topic Re: Fatal Error: K2
New information: somehow K2 has conflict with Landing Page Designer Component. The error only occurs when I am logged in as a user. When I am not logged in it works fine.

When I comment out line #65 in utilities.php works all the time but I lose k2 author images.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #110317 by Maik Kaune
Replied by Maik Kaune on topic Re: Fatal Error: K2 | PHP version on server ?

Superkoala wrote: ...
Fatal error: Class 'K2Model' not found in /var/www/clients/client602/web1221/web/plugins/system/k2/k2.php on line 411 ...
I have also on the mainpage after the update a problem with my slider ...


Please, check your servers PHP version. Running PHP 5.3+ could solve your issue.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #110318 by Maik Kaune
Replied by Maik Kaune on topic Re: Fatal Error: K2 - PHP 5.2.17
Unfortunately, i can re-create the same issue on my clients hosting environment and PHP 5.2.17

Fatal error: Class 'K2Model' not found ... in line 418

The strange thing:
My local MAMP, set to PHP 5.2.17 works like a charm.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago - 10 years 9 months ago #110319 by Pedro Arruda
Replied by Pedro Arruda on topic Re: Fatal Error: K2
I detect a conflit with DJ Classifieds.
1- K2Model::addIncludePath(JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'models');
2- $model = K2Model::getInstance('Item', 'K2Model');
3- $profile = $model->getUserProfile($userID);
4- $avatar = (is_null($profile)) ? '' : $profile->image;
5- if (empty($avatar))

Classifieds simply give me a blank page via menu.
Editing components/com_k2/helpers/utilities.php, If I remove line 3 (in the example, my real line is 65), I can load the Component with no problem but the Author image in K2 Items and User goes away.

Very strange I don't know how can I solve that.

Regards and thanks for any help.

Pedro

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #110320 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Fatal Error: K2
Check if that component has the option to disable it's user profiles, so you can use K2's profiles and login.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #110321 by Pedro Arruda
Replied by Pedro Arruda on topic Re: Fatal Error: K2
Hi Krigor,
Thank you for your support,
No, the Component (DJ-Classifieds) work with core Joomla users, there is no option.
But I discover one thing. I just have this problem with site offline!!
For moments I put the site online and no problem at all using the component.
This situation 'kill me', because I have a sub-domain that is a exact replication of the production site, that we use for tests. And, indeed, the only difference is that the test site is online and the production site is not.
Incredible!
Meanwhile, I still have a problem that is how verify, adjust and work with the front-end component, if I can't make it load in offline mode?

Regards and thanks again,

Pedro

Krikor Boghossian wrote: Check if that component has the option to disable it's user profiles, so you can use K2's profiles and login.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum