Flexicontent with K2 Component compatibility [Solved]

More
9 years 10 months ago #52042 by Adinfo
Hello again, the above problem is solved but I'm having more problems.

I created a module k2_content and I have assigned to flexicontent menu and the following error appears.

"Fatal error: Call to a member function getItemTags() on a non-object in D:\xampp2\htdocs\sotano3\modules\mod_k2_content\helper.php on line 356"

Now seems to be a problem with the module k2_content when load tags or other info, if i select show only title and image in module works.

If I assign the same module to menu joomla content works.

What happens? Thanks for everything.

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

More
9 years 10 months ago #52043 by ggppdk
Hello

please note this answer and report the issue and fix in K2 forums, maybe mentioning "suggested fix"



-- this is a bug on the module
the call:
Code:
$model = K2Model::getInstance('Item', 'K2Model');

should be (find the line and test the fix):
Code:
JLoader::import( 'components.com_k2.models.item', JPATH_SITE ); $model = K2Model::getInstance('Item', 'K2Model');



Joomla Loader will load the first "item.php" that it finds in the include path,



so if you have any component or other EXTENSION that adds a path that contains ".../models/item.php" then Joomla will import that PHP file instead

solution add:
JLoader::import( 'components.com_k2.models.item', JPATH_SITE );
as suggested above


NOTE: this is not a FLEXIcontent related bug


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
9 years 10 months ago #52045 by Adinfo
Very thanks ggppdk, you saved me again.
Thanks a lot for support.

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

More
9 years 10 months ago #52053 by ggppdk
Hello

i see you have not reported this in k2 forum ?

otherwise you will not get this fixed in future releases


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
9 years 10 months ago #52059 by Adinfo

ggppdk wrote: Hello

i see you have not reported this in k2 forum ?

otherwise you will not get this fixed in future releases

Hi, sorry for the delay.

I created a post in Spanish k2 forums explaining the problem, here's the post.

www.joomlaworks.net/forum/k2-es/39201-pr...lo-k2_content#136344 .

Regards.

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

More
9 years 10 months ago #52062 by ggppdk
Hello

1. developers speak english, better in english forum

2. Mentioning a specific component may get you ignored,
Stress that the bug is not related to specific compontent but to any extension that also has a model file:
item.php



So please make a 2nd thread in english forum, with this text:


FATAL error in
modules\mod_k2_content\helper.php

Fatal error: Call to a member function getItemTags() on a non-object in ...\modules\mod_k2_content\helper.php on line 356"


-- when you have another extension with an
models/item.php



Explanation:
Joomla Loader will load the first "item.php" that it finds in the include path,

so if you have any component or other EXTENSION that adds a path that contains ".../models/item.php" then Joomla will import that PHP file instead

solution add:
JLoader::import( 'components.com_k2.models.item', JPATH_SITE );

before:
$model = K2Model::getInstance('Item', 'K2Model');


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 1.202 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline