Exception Occurred: mysql error: [1048: Column 'fID' cannot be null] in EXECUTE("insert into DownloadStatistics (fID, fvID, uID) values (NULL, 0, 0)")

Permalink
I've got a very old site (Version: 5.3.3.1) where I'm seeing a repeated error in the log:

Exception Occurred: mysql error: [1048: Column 'fID' cannot be null] in EXECUTE("insert into DownloadStatistics (fID, fvID, uID) values (NULL, 0, 0)")
#0 /home/landaula/public_html/concrete/libraries/3rdparty/adodb/adodb.inc.php(1042): adodb_throw('mysql', 'EXECUTE', 1048, 'Column 'fID' ca...', 'insert into Dow...', false, Object(ADODB_mysql))
#1 /home/landaula/public_html/concrete/libraries/3rdparty/adodb/adodb.inc.php(998): ADOConnection->_Execute('insert into Dow...')
#2 [internal function]: ADOConnection->Execute('insert into Dow...', Array)
#3 /home/landaula/public_html/concrete/libraries/database.php(73): call_user_func_array(Array, Array)
#4 /home/landaula/public_html/concrete/models/file.php(402): Database->__call('Execute', Array)
#5 /home/landaula/public_html/concrete/models/file.php(402): Database->Execute('insert into Dow...', Array)
#6 /home/landaula/public_html/concrete/controllers/download_file.php(66): File->trackDownload()
#7 /home/landaula/public_html/concrete/controllers/download_file.php(26): DownloadFileController->download(Object(File))
#8 [internal function]: DownloadFileController->view('10')
#9 /home/landaula/public_html/concrete/libraries/controller.php(134): call_user_func_array(Array, Array)
#10 /home/landaula/public_html/concrete/libraries/controller.php(111): Controller->runTask('view', Array)
#11 /home/landaula/public_html/concrete/libraries/view.php(583): Controller->setupAndRun()
#12 /home/landaula/public_html/concrete/dispatcher.php(214): View->render(Object(Page))
#13 /home/landaula/public_html/index.php(5): require('/home/landaula/...')


I can't quite seem to figure out what's causing it. Anybody have any ideas?

Thanks

 
mnakalay replied on at Permalink Reply
mnakalay
That's not going to tell you why it's happening but at least you'll know what is happening.

When downloading a file, Concrete5 keeps a count to be able to show you download statistics.

It keeps track of the file ID (fID) the file's version ID (fvID) and the user ID (uID)

The fID is required.

What is happening here is the system is trying to save a null value for the fID which throws an error.

So the question is, do you have a link somewhere to download a file that was deleted from the file manager?