Jump to content

[Resolved] Digital downloads and filemanager error


harrisorganic

Recommended Posts

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?

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

On the SQL tab is:sql1.PNG

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` = '';

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

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