harrisorganic Posted April 24, 2016 Share Posted April 24, 2016 In my system error log I have this error and many others relating to a filepath cannot be Null for digital downloads File: [filemanager.class.php] Line: [893] "INSERT INTO `CubeCart_filemanager` (`type`,`filepath`,`filename`,`filesize`,`mimetype`,`md5hash`) VALUES ('1',NULL,'vineyard-walk-may.pdf','330865','application/pdf','46a132b04a123725f712eba39bdd8fe3');" - Column 'filepath' cannot be null The symptom is such that the customers digital download gives a 404 error https://www.harrisorganicwine.com.au/shop/sun-morn-walk.html Any clues? Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 25, 2016 Share Posted April 25, 2016 When upgrading, a number of CubeCart version intervals are passed through on the way to CC6011. Each interval applies some changes to the database structure. CC500b1 ALTER TABLE `CubeCart_filemanager` CHANGE `filepath` `filepath` VARCHAR(255) default NULL; UPDATE `CubeCart_filemanager` SET `filepath` = NULL WHERE `filepath` = ''; CC507 ALTER TABLE `CubeCart_filemanager` CHANGE `filepath` `filepath` VARCHAR(255) default NULL; UPDATE `CubeCart_filemanager` SET `filepath` = NULL WHERE `filepath` = ''; CC509 UPDATE `CubeCart_filemanager` SET `filepath` = NULL WHERE `filepath` = ''; I think somewhere along the way, the command to UPDATE the filemanager table as shown above did not happen. (Why several intervals at doing the same thing? I don't really know.) Quote Link to comment Share on other sites More sharing options...
harrisorganic Posted April 25, 2016 Author Share Posted April 25, 2016 Thanks Brian, I have looked at the filemanager.class.php file and the filemanager database with phpMyAdmin without anything "jumping out of the screen at me". How does one update the filemanager table? Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 25, 2016 Share Posted April 25, 2016 Execute the ALTER TABLE statement in phpMyAdmin. Quote Link to comment Share on other sites More sharing options...
harrisorganic Posted April 25, 2016 Author Share Posted April 25, 2016 Is this it? Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 25, 2016 Share Posted April 25, 2016 What is on the SQL tab? Try this instead: In Cubecart admin, Maintenance, Query Database tab, enter the complete one-line ALTER statement as shown above in the Query box. Quote Link to comment Share on other sites More sharing options...
harrisorganic Posted April 25, 2016 Author Share Posted April 25, 2016 On the SQL tab is: And I assume this is your suggestion re: admin, Maintenance, Query Database tab ALTER TABLE `CubeCart_filemanager` CHANGE `filepath` `filepath` VARCHAR(255) default NULL; UPDATE `CubeCart_filemanager` SET `filepath` = NULL WHERE `filepath` = ''; Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted April 25, 2016 Share Posted April 25, 2016 Bsmither suggested you do this from within CubeCart Maintenance. There is a Query Database tab. Quote Link to comment Share on other sites More sharing options...
harrisorganic Posted April 26, 2016 Author Share Posted April 26, 2016 Thanks, I am unsure if this is the code to enter. ALTER TABLE `CubeCart_filemanager` CHANGE `filepath` `filepath` VARCHAR(255) default NULL; UPDATE `CubeCart_filemanager` SET `filepath` = NULL WHERE `filepath` = ''; Quote Link to comment Share on other sites More sharing options...
harrisorganic Posted April 26, 2016 Author Share Posted April 26, 2016 result File: [maintenance.sql.inc.php] Line: [23] "ALTER TABLE `CubeCart_filemanager` CHANGE `filepath` `filepath` VARCHAR(255) default NULL; UPDATE `CubeCart_filemanager` SET `filepath` = NULL WHERE `filepath` = ''; " - 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 'UPDATE `CubeCart_filemanager` SET `filepath` = NULL WHERE `filepath` = ''' at line 1 Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 26, 2016 Share Posted April 26, 2016 In the query box: Enter just this: ALTER TABLE `CubeCart_filemanager` CHANGE `filepath` `filepath` VARCHAR(255) default NULL; and click the Go button. Then, enter just this: UPDATE `CubeCart_filemanager` SET `filepath` = NULL WHERE `filepath` = ''; and click the Go button. Quote Link to comment Share on other sites More sharing options...
harrisorganic Posted April 26, 2016 Author Share Posted April 26, 2016 Thank so much Brian, working now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.