schwagal Posted April 14, 2011 Share Posted April 14, 2011 Hi there,I did an update recently - 1.3.6.0 to 1.4.0.17 Now everytime I want to add an image to a new or existing product I always get this error message: Fatal error (StockMvt -> id_stock_mvt_reason = -1)Any ideas? Link to comment Share on other sites More sharing options...
shokinro Posted April 15, 2011 Share Posted April 15, 2011 there are many things could cause fatal error. some time run out of memory also cause this. try set to following parameter in /comfig/config.inc.php to see if you can see any errors@ini_set('display_errors', 'on'); Link to comment Share on other sites More sharing options...
schwagal Posted April 15, 2011 Author Share Posted April 15, 2011 there are many things could cause fatal error. some time run out of memory also cause this. try set to following parameter in /comfig/config.inc.php to see if you can see any errors@ini_set('display_errors', 'on'); Hi,Thanks for the reply - Turned the debugging "display errors" on but doesn't make any difference of the error output, just says the same thing, when I try to upload another image.Any other idea or pointer in some direction, where to look at would be appreciated..Cheers Link to comment Share on other sites More sharing options...
shokinro Posted April 15, 2011 Share Posted April 15, 2011 Have no idea what is the cause.from the error message, it seem that related to stock change. (but why upload image will affect stock?)seem trying to insert a StockMvt record, but id_stock_mvt_reason = -1maybe database related error.The in same config/config.inc.php, there is another parameter set as following, see if there any database error.define('_PS_DEBUG_SQL_', true); Link to comment Share on other sites More sharing options...
shokinro Posted April 15, 2011 Share Posted April 15, 2011 Can you also check database table "ps_stock_mvt_reason_lang" to see if the stock_mvt_reason have all the lanugages you are using at your store?If you install some new language after store installation, maybe the stock_mvt_reason for new language is not added.and so there is record and id_stock_mvt_reason becomes -1? (just guess) Link to comment Share on other sites More sharing options...
schwagal Posted April 15, 2011 Author Share Posted April 15, 2011 Have no idea what is the cause.from the error message, it seem that related to stock change. (but why upload image will affect stock?)seem trying to insert a StockMvt record, but id_stock_mvt_reason = -1maybe database related error.The in same config/config.inc.php, there is another parameter set as following, see if there any database error.define('_PS_DEBUG_SQL_', true); Thanks again, flicked that on but doesn't give me any more details about what could be going wrong.Apache doesn't need a graceful/restart or anything, right? Link to comment Share on other sites More sharing options...
schwagal Posted April 15, 2011 Author Share Posted April 15, 2011 Can you also check database table "ps_stock_mvt_reason_lang" to see if the stock_mvt_reason have all the lanugages you are using at your store?If you install some new language after store installation, maybe the stock_mvt_reason for new language is not added.and so there is record and id_stock_mvt_reason becomes -1? (just guess) Yeah I can poke around a bit, not too familiar with the schema and my SQL foos are a bit weak but I'll post possible informations about it, Thanks. Link to comment Share on other sites More sharing options...
schwagal Posted April 16, 2011 Author Share Posted April 16, 2011 I found many duplicate bug reports about this on the bugtracker but also some pointers into the forum, where people discussed this.http://www.prestashop.com/forums/viewthread/97616/installing_prestashop/solved_fatal_error_stockmvt__id_stock_mvt_reason__1^^ With setting - the default stock movement reason from “order” to “increase” - I managed to be able to upload images again.Hope that helps others, too.Cheers... Link to comment Share on other sites More sharing options...
shokinro Posted April 16, 2011 Share Posted April 16, 2011 thanks for feedback and sharing the information. So the issue IS stock movement related.please mark it as SOLVED if you think your issue has been fixed. thanks Link to comment Share on other sites More sharing options...
schwagal Posted April 16, 2011 Author Share Posted April 16, 2011 Yeah looked like it.I'll mark this thread as solved, thanks. Link to comment Share on other sites More sharing options...
websitedesignerss Posted April 16, 2011 Share Posted April 16, 2011 I got an idea from your posts. Thank you for your information. Link to comment Share on other sites More sharing options...
Bella Posted April 23, 2011 Share Posted April 23, 2011 Thanks, Schwagal, that did the trick! Link to comment Share on other sites More sharing options...
Recommended Posts