Keyword

empty parameters in mod_k2_content

  • Kai Roen
  • Kai Roen's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 5 months ago #81772 by Kai Roen
empty parameters in mod_k2_content was created by Kai Roen
I am having problems with the mod_k2_content on one site. It seems that the parameters in the modules is not set. I have created a category, and made sure that title parameter is set to show on every setting in K2. If I remove the <?php if($params->get('itemTitle')): ?> in default template for the module, it works fine. Also checked the SQL query in helper.php file, it works fine. So what parameters are the mod_k2_content using?

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

  • Kai Roen
  • Kai Roen's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 5 months ago #81773 by Kai Roen
Replied by Kai Roen on topic empty parameters in mod_k2_content
Just installed a clean version of K2, and it seems this problem had something to do with other extensions installed on server.

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

More
13 years 8 months ago #81774 by Willie
Replied by Willie on topic empty parameters in mod_k2_content
 

 

Watch out if you have a plugin like Joomlart's ja_thumbnail, that resets the $params variable, as it is passed by reference.

 

At least it will have to be adapted to detect that the content comes from K2 and return without touching anything, or as a root solution modify it so it only reads the parameters but not destroys them.

 

In the particular case of ja_thumbnail, you can add this code as the first line after the function onPrepareContent of ja_thumbnail.php plugin:

 

if (strpos($article->link, 'option=com_k2')) return;

 

This will make the plugin to do nothing if under k2.

 

A more elaborated solution would be to just do whatever it needs to do, but without re-assigning the parameters.

 

Best regards,

Willie

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


Powered by Kunena Forum