Keyword

Model class K2ModelItem not found in file

  • DarioB
  • DarioB's Avatar Topic Author
  • Offline
  • New Member
More
11 years 11 months ago #104908 by DarioB
This error is show on Joomleague component pages in my page.

Look
Lechia.net

Lechia.net [2]

K2 ver. 2.6.1
JL 1.6

With K2 2.5.7 all is ok.

What should I do?

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

More
11 years 11 months ago - 11 years 11 months ago #104909 by Tiago Ricciardi
Replied by Tiago Ricciardi on topic Re: Model class K2ModelItem not found in file
I'm having the same problem.

Using a component developed by me, as soon as i initialize my controller, the k2 content module throws that error. even if i don't initialize the controller..

I've found a workaround adding :
JModel::addIncludePath(JPATH_SITE.'/components/com_k2/models/','K2Model');
to the mod_k2_content/helper.php file on:


class modK2ContentHelper
{

public static function getItems(&$params, $format = 'html')
{

jimport('joomla.filesystem.file');

..............................

class modK2ContentHelper
{

public static function getItems(&$params, $format = 'html')
{
JModel::addIncludePath(JPATH_SITE.'/components/com_k2/models/','K2Model');
jimport('joomla.filesystem.file');

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


Powered by Kunena Forum