All extensions are free now. Because it was coded by Russians.

K2 Filter : error when hiding subcategories

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

#
Hello,

I've been trying to set up this module since yesterday and i'm having an hard time trying to hide the subcategories from the search results, not the items from the subcategories, but the subcategry blocks that shows in the search results.

When i uncheck "include sub-categories" i get this error :
1064
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1

Everythings fine when i activate it back.

Could you help me out ?

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

#
Hello, Thibaut.

Could you tell me which exactly Joomla and module version you have?

Actually, this parameter not about blocks in the layout.
Are you using category template for search results? In this case you need to go to K2 category and disable sub-categories block under its parameters.

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

#
Thanks for your quick reply,

Im using joomla 3.10.2 with php 7.3.30 and i'm using your latest version of the module (just bought it a few days ago)

Okay so it's only about adding childrens item of subcategories in the results.
I have a K2 layout set up with subcategory blocks, but i want it to stay that way on this page.

If i understand it right i have to override the generic.php file if i want to have a different layout on the result than in the category view ?

No way to select another template than generic or the one already assigned to the category ?

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

#
If you have category template for search results page, then it is K2 category template used (not generic.php).

You can modify your K2 category template file for disable sub-categories block on search results page.

Or, you can use some other dummy K2 category and set its id in the module's parameters. Then, this other category's template will be used and you can set any parameters in this category.

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

#
Solved the problem creating a parent dummy category with a custom template and parameters restricting the module to this category and using the category template.

Thanks a lot for your help.