Random Error 1064 after Upgrade

  • Posts: 41
  • Thank you received: 1
11 years 8 months ago #136297

-- url of the page with the problem -- : www.showcarcustoms.com/fbs
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 3.2
-- PHP version -- : 5.3.27
-- Browser(s) name and version -- : Firefox, Chrome
-- Error-message(debug-mod must be tuned on) -- : Error_message

Just upgraded Joomla version and Hikashop. All seemed well until I randomly got this message (below). I've got it on a few different products that were all previously there before the upgrade. One product that I added before the upgrade, but updated after the upgrade, I seem to get it on the most, so I temporarily disabled it. One minute it will work, the next, it won't. Any insight as to where the problem is? I'd like to start selling the product that I'm having the most issues with today, but I won't enable it until I know it is fixed.

Error: 1064 - 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 ') AND b.product_type = 'main' AND (b.product_access = 'all' OR b.product_access ' at line 1 SQL=SELECT DISTINCT b.* FROM XXXX_hikashop_product AS b WHERE b.product_published=1 AND b.product_id IN () AND b.product_type = 'main' AND (b.product_access = 'all' OR b.product_access LIKE '%,9,%') ORDER BY b.product_id ASC LIMIT 0, 3

You may not be able to visit this page because of:

an out-of-date bookmark/favourite
a search engine that has an out-of-date listing for this site
a mistyped address
you have no access to this page
The requested resource was not found.
An error has occurred while processing your request.

Last edit: 11 years 8 months ago by wild4gsus.

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

  • Posts: 84233
  • Thank you received: 13673
  • MODERATOR
11 years 8 months ago #136316

Hi,

That's a simple check which is missing somewhere because the condition b.product_id IN () shouldn't be in the query if there are no products.
The issue is that such query is at several places in HikaShop so I need more debug data to be able to tel you what to do exactly to fix that.
Please turn on the debug mode of the joomla configuration and try again. That should display the error with more information (a backtrace). If you could copy/paste it here, that would be great.

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

  • Posts: 41
  • Thank you received: 1
11 years 8 months ago #136327

The errors relate to duplicates. I'll PM you a login so you can see the list of duplicates. Not sure why that happened.

The product that it happens to the most is the Calendar under the "Household" link.

Last edit: 11 years 8 months ago by wild4gsus. Reason: added product

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

  • Posts: 84233
  • Thank you received: 13673
  • MODERATOR
11 years 8 months ago #136333

Change the line:

$filters[]='b.product_id IN ('.implode(',',$ids_for_the_query).')';
to:
if(count($ids_for_the_query)){
						$filters[]='b.product_id IN ('.implode(',',$ids_for_the_query).')';
					}else{
						$filters[]='b.product_id=0';
					}
in the file components/com_hikashop/views/product/view.html.php and that should help.

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

  • Posts: 41
  • Thank you received: 1
11 years 8 months ago #136337

So far, so good! I'll keep an eye on it for a few days to make sure it solved the problem!

Thanks for the fast response!

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

  • Posts: 2
  • Thank you received: 0
10 years 1 month ago #208668

I just downloaded and installed the latest Business version of Hikashop (with the sample content) on a Joomla 3.4.3 site. When I browse the sample categories and get to a child category here products should appear, like Shoes > Men, or English > Ebooks I see a white page and get this error:

"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 ')' at line 1"

I turned on debug and found this additional info right after the error message:

SELECT category_name FROM z1exu_hikashop_category WHERE category_id IN()

Here's part of the URL, in case it's helpful:

index.php?option=com_hikashop&ctrl=category&task=listing&cid=27&name=english-books&Itemid=460

Any ideas?

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

  • Posts: 12953
  • Thank you received: 1778
10 years 1 month ago #208689

Hello,
It's properly working on my end so can you give me more information like :
- How your category which have the ID number 27 is configured ?
- Does it work if you try it with categories that you have manually created ?

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

  • Posts: 1
  • Thank you received: 0
10 years 4 weeks ago #208876

It seems to be working now. All I did was create a test category with a test product and update the menu item to point to the new category. My test category displayed okay... Then I changed it back to the default Hikashop demo category and it worked too. No more error.

Strange... At least it's working now!

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

Time to create page: 0.095 seconds
Powered by Kunena Forum