Keyword

[SOLVED] Show catagories : toMySQL error

  • Mirjan Hajnc
  • Mirjan Hajnc's Avatar Topic Author
  • Offline
  • New Member
More
11 years 3 months ago #113469 by Mirjan Hajnc
[SOLVED] Show catagories : toMySQL error was created by Mirjan Hajnc
Hi,

On my web page I would like to show Category and all its Subcategories without any item. I have main Category and 8 Subcategories.
I use Joomla! 3.1.1 Stable and K2 v2.6.6.

My problem is when I set "Sub-category blocks" to Show i get an error in log and blank web page with only Title and description of the first subcategory.

Here is the error in the log file:
mod_fcgid: stderr: PHP Fatal error:  Call to undefined method JDate::toMySQL() in /var/www/clients/client4/web13/web/borak/templates/ol_chranet/html/com_k2/templates/default/category.php on line 107

in attachments are screen-shots of K2 category settings

Attachment not found



Attachment not found



Attachment not found




Please help.

Thank you.
Attachments:

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 3 months ago #113470 by Yiota
Replied by Yiota on topic Re: Show catagories : toMySQL error
Have you tried to disable the K2 override in your template and see if the error remains with the default component's template?

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

  • Mirjan Hajnc
  • Mirjan Hajnc's Avatar Topic Author
  • Offline
  • New Member
More
11 years 3 months ago #113471 by Mirjan Hajnc
Replied by Mirjan Hajnc on topic Re: Show catagories : toMySQL error
Yes I did. I try both options, but the result is still the same.
Attachments:

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 3 months ago #113472 by Yiota
Replied by Yiota on topic Re: Show catagories : toMySQL error
The path to the error is to the category.php file that is located in your template's folder. Just rename the folder of the com_k2 inside templates/YOUR_TEMPLATE/html/com_k2 with adding an underscore to the folder name, like com_k2_. This way the override of the template will not run and the default from the K2 component will.

This way we will make sure that the error is in fact to the K2 template override and not the component itself.

The option you are disabling through the K2 parameters has to do only with CSS and Javascript as it states.

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

  • Mirjan Hajnc
  • Mirjan Hajnc's Avatar Topic Author
  • Offline
  • New Member
More
11 years 3 months ago #113473 by Mirjan Hajnc
Replied by Mirjan Hajnc on topic Re: Show catagories : toMySQL error
If i disable K2 override in my template (as you suggested), error dissapear.
My question now is, should I use default template or how can I fix the error in custom template.
What do you suggest?

Thank you very much for your help.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 3 months ago #113474 by Yiota
Replied by Yiota on topic Re: Show catagories : toMySQL error
You will have to check what is different between the category.php of the default template inside the component and the one you have in your template override.

What is in the line the error points to in your templates category.php file?

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

  • Mirjan Hajnc
  • Mirjan Hajnc's Avatar Topic Author
  • Offline
  • New Member
More
11 years 3 months ago #113475 by Mirjan Hajnc
Replied by Mirjan Hajnc on topic Re: Show catagories : toMySQL error
Your support was very helpful to me. I managed to solve the problem.
Thank you very much for your help.

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


Powered by Kunena Forum