Jump to content

[SOLVED]Upgraded from 1.3.6 to PS 1.4 - Fatal error (StockMvt -> id_stock_mvt_reason = -1) message


Recommended Posts

I upgraded to PS1.4 from 1.3.6 successfully. But then when I wanted to update the product, I got the message "Fatal error (StockMvt -> id_stock_mvt_reason = -1)" and I could not view the product as the BO went blank. I tried ordering the product in FO without any problems. How does this happen and how to overcome this problem. Thank you.

40822_eDxmo5Ty3lCAMOMFeBLW_t

Link to comment
Share on other sites

Hello,

This is the common solution you can find in the forum:
-> Go to ps_stock_mvt_reason, remove "auto increment" on the 'id_stock_mvt_reason' field,
-> Create a record with id_stock_mvt_reason = 0 and sign = 1 like this :

insert into ps_stock_mvt_reason VALUES(0,1,now(),now()) ;



I hope this help.
Mike

Link to comment
Share on other sites

Hello,

This is the common solution you can find in the forum:
-> Go to ps_stock_mvt_reason, remove "auto increment" on the 'id_stock_mvt_reason' field,
-> Create a record with id_stock_mvt_reason = 0 and sign = 1 like this :
insert into ps_stock_mvt_reason VALUES(0,1,now(),now()) ;



I hope this help.
Mike



Alright.. found the sql table and removed the auto increment.. this was easy.

But from phpmy4612 that I use I am not sure how to create a record with the =0 and sign =1
Link to comment
Share on other sites

ALTER TABLE  `ps_stock_mvt_reason` CHANGE  `id_stock_mvt_reason`  `id_stock_mvt_reason` INT( 11 ) NOT NULL;
ALTER TABLE  `ps__stock_mvt_reason` DROP PRIMARY KEY;
INSERT INTO `ps_stock_mvt_reason` (
`id_stock_mvt_reason` ,
`sign` ,
`date_add` ,
`date_upd`
)
VALUES (
'0',  '1', NOW( ) , NOW( )
);
ALTER TABLE `ps_stock_mvt_reason` ORDER BY  `id_stock_mvt_reason`;

Link to comment
Share on other sites

When I export my table it look like this:

-- phpMyAdmin SQL Dump
-- version 2.6.2-pl1
-- http://www.phpmyadmin.net
-- 
-- Host: localhost
-- Generation Time: Mar 22, 2011 at 04:30 AM
-- Server version: 5.0.22
-- PHP Version: 5.2.3
-- 
-- Database: `ratechcomtw`
-- 

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

-- 
-- Table structure for table `ps_stock_mvt_reason`
-- 

CREATE TABLE `ps_stock_mvt_reason` (
 `id_stock_mvt_reason` int(11) NOT NULL,
 `sign` tinyint(1) NOT NULL,
 `date_add` datetime NOT NULL,
 `date_upd` datetime NOT NULL,
 PRIMARY KEY  (`id_stock_mvt_reason`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table `ps_stock_mvt_reason`
-- 

INSERT INTO `ps_stock_mvt_reason` (`id_stock_mvt_reason`, `sign`, `date_add`, `date_upd`) VALUES (3, -1, '2011-03-20 01:59:24', '2011-03-20 01:59:24'),
(4, -1, '2011-03-20 01:59:24', '2011-03-20 01:59:24'),
(5, 1, '2011-03-20 01:59:24', '2011-03-20 01:59:24'),
(1, 1, '2011-03-20 01:59:38', '2011-03-20 01:59:38'),
(2, -1, '2011-03-20 01:59:38', '2011-03-20 01:59:38');

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...