Internal server error on new menu items

  • Posts: 23
  • Thank you received: 0
10 years 4 months ago #200505

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.28
-- Error-message(debug-mod must be tuned on) -- : Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, This email address is being protected from spambots. You need JavaScript enabled to view it. and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache Server at www.xxx.yyy Port 80

Hi,

i have a strange issue:

For every new menu item (product & category listing) i receive a 500 Internal server error when i browse the item in the front-end.
What can i do to pin this error down? Error reporting and system debug options is all enabled.

There are also older menu items which i created some time ago. These are still working more or less. They work as long as the just display (sub-) categories. As soon as the would display products (when browsing down the category hierachy) a SQL error occurs:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM aj8bh_hikashop_product WHERE product_id IN (25417,25418)' at line 1 SQL=SELECT DISTINCT FROM aj8bh_hikashop_product WHERE product_id IN (25417,25418)

So the query doesn't select any columns form the product table.

The website isn't online yet, so i could create a user for you and you can login if you need to.

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 4 months ago #200512

Hi,

I've looked through the code for that query and the only one I could find which could potentially create that error is in the filter system.
From what I understand, it would happen if you had created a filter applying on a custom field without selecting any custom product field (which can only happen if you don't have any custom product fields, and thus there is no point in creating such filter).
If that's indeed the issue, then there are two easy solutions:
1. Delete that filter via the menu Display>Filters.
2. Change the code:

if(!empty($datas['products'])){
in the function getFields of the file administrator/components/com_hikashop/classes/filter.php to:
if(!empty($filter->filter_options['custom_field']) && !empty($datas['products'])){

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

  • Posts: 23
  • Thank you received: 0
10 years 4 months ago #200567

thanks! that misconfigured filter fixed both (the SQL error and the Internal server error)

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

Time to create page: 0.060 seconds
Powered by Kunena Forum