Jump to content

stockWarn issue when adding new product


cubehelper

Recommended Posts

Hello,

I'm getting the following error when adding a new product,

MySQL Error Occured

Error Message:

1264: Out of range value adjusted for column 'stockWarn' at row 1

There is no field to select regarding the stockWarn in the product page.

I had to do the following hack to admin\sources\products\index.inc.php file to bypass this issue,

$record["stockWarn"] = $db->mySQLSafe( !isset($_POST['stockWarn']) ? 0 : $_POST['stockWarn']);

Please advise.

Thanks,

-Cubehelper

Link to comment
Share on other sites

Guest hennaboy

What version of Mysql are you running? Is this mysql 5.x

I can recall errors like this arising in CC3 whn using mysql 5.x in certain modes I believe it has something to do with the error reporting. Off to the office. Will have a look in about 30mins

Link to comment
Share on other sites

What version of Mysql are you running? Is this mysql 5.x

I can recall errors like this arising in CC3 whn using mysql 5.x in certain modes I believe it has something to do with the error reporting. Off to the office. Will have a look in about 30mins

Yes, this is a brand new installation of v4.0. I'm using MySql version 5.0.27-community-nt

Link to comment
Share on other sites

  • 1 month later...
Guest Barefoot Chris

You need to make sure MySQL is NOT running in strict mode. :huh:

Mine appears to have the mode blank according to the system variables. This is the default, I believe, and I would presume it is NOT strict by default.

Please advise.

Also, is there anyplace where I can see a list of updated database fields from v3 to v4 to make sure the database was upgraded properly during the installation?

Link to comment
Share on other sites

Guest Barefoot Chris

You need to make sure MySQL is NOT running in strict mode. :huh:

Mine appears to have the mode blank according to the system variables. This is the default, I believe, and I would presume it is NOT strict by default.

Please advise.

Also, is there anyplace where I can see a list of updated database fields from v3 to v4 to make sure the database was upgraded properly during the installation?

FYI. I resolved this issue. I found the upgrade.sql file in the 4.0.3 zip file. I checked through all the altered tables via PHP/mySQL to confirm all the changes were made. I found 2 that were not:

-----------------------------------------------------------------------------------------------------------------

ALTER TABLE `CubeCart_inventory` ADD `tax_inclusive` TINYINT(1) NULL DEFAULT '0' AFTER `taxType`; EOQ

ALTER TABLE `CubeCart_inventory` ADD `stockWarn` TINYINT(1) NULL default '0' AFTER `stock_level` ; #EOQ

-----------------------------------------------------------------------------------------------------------------

I manually copied these lines into a PHP/mySQL command line to run the changes. It appears the reason they didn't run during the upgrade is due to a missing # sign from the EOQ after the first ALTER TABLE command. I guess this caused both these commands to fail.

Sincerely,

Barefoot Chris

www.barefootchris.net

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...