Jump to content

Resolved - Error Log catalogue.class.php


Ben224

Recommended Posts

Hi I get the following system error when I login to my admin. Can anyone help resolve this?

File: [catalogue.class.php] Line: [538] "SELECT * FROM `CubeCart_option_value` WHERE CubeCart_option_value.option_id = '1' AND `value_id` IN () ORDER BY `value_name` ASC ;" - 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 ') ORDER BY `value_name` ASC' at line 1

Thanks in advance

Link to comment
Share on other sites

Welcome Ben224! Glad to see you made it to the forums.

Please always let us know what version of CC5 you are running and whether it a fresh install or an "upgrade" from any prior version of CC4/5.

From the line number of the error, you must be using CC511.

Do you have any products that have an option but no value given to that option?

Like:

Color:

but no actual colors tied to that option. Or,

Phrase:

but no actual text phrases tied to that option.

Lists of colors and phrases may actually exist, but maybe none have been tied to an option of a product?

I've found a failed check for out-of-bounds values in the database class. I've submitted a bug report.

In the meantime, please reply with an answer to the above question:

Is there a product that has an option that have no choices of values made for that option?

For a work-around, use a programmer's text editor and open the file /classes/db/database.class.php for editing.

Find at around line 739:


foreach ($value as $i => $val) {

  if (empty($val)) unset($value[$i]);

}

Place // in front of these three lines.

Go to the admin Maintenance screen and clear the SQL cache.

Test and report back.

Link to comment
Share on other sites

Hi Bsmither thanks for your reply.

I am indeed using CC511. Thanks for the clear and concise support. You were absolutly spot on!

I reviewed my products from the admin panel and found that I had an option without a value given to it as you suggested.

The issue was solvable at the admin panel level so it wasnt necessary to go into the php files to correct in this instance.

Very much appreciated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...