goldsky / FileDownload-R

FileDownload snippet for MODX revolution
12 stars 7 forks source link

fdPaths: Attempt to set NOT NULL field media_source_id to NULL #49

Open pashajanx opened 8 years ago

pashajanx commented 8 years ago

Hello, I have a problem with your plugin.

When downloading the file gives the error:

[2016-05-18 17:03:44] (ERROR @ /index.php) fdPaths: Attempt to set NOT NULL field media_source_id to NULL
[2016-05-18 17:03:45] (WARN @ /public_html/core/components/filedownloadr/model/filedownloadr/filedownloadr.class.php : 2261) PHP notice: Undefined index: mediaSourceId
[2016-05-18 17:03:45] (WARN @ /public_html/core/components/filedownloadr/model/filedownloadr/filedownloadr.class.php : 780) PHP notice: Undefined index: mediaSourceId
[2016-05-18 17:03:45] (WARN @ /public_html/core/components/filedownloadr/model/filedownloadr/filedownloadr.class.php : 2242) PHP notice: Undefined index: mediaSourceId
[2016-05-18 17:03:45] (WARN @ /public_html/core/components/filedownloadr/model/filedownloadr/filedownloadr.class.php : 791) PHP notice: Undefined index: mediaSourceId
[2016-05-18 17:03:45] (WARN @ /public_html/core/components/filedownloadr/model/filedownloadr/filedownloadr.class.php : 2242) PHP notice: Undefined index: mediaSourceId

It helps clearing the cache, but after the first boot again gives the same error.

Sorry for the English (I'm from Ukraine)

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/34349587-fdpaths-attempt-to-set-not-null-field-media_source_id-to-null?utm_campaign=plugin&utm_content=tracker%2F1480317&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1480317&utm_medium=issues&utm_source=github).
goldsky commented 8 years ago

PHP version?

pashajanx commented 8 years ago

5.4.45

pashajanx commented 8 years ago

probably a mistake, because the HTTPS protocol, but the HTTP protocol also has error HTTP: [2016-05-19 11:24:43] (WARN @ /public_html/core/cache/includes/elements/modsnippet/129.include.cache.php : 330) PHP notice: Undefined offset: 1 [2016-05-19 11:24:43] (WARN @ /public_html/core/components/filedownloadr/model/filedownloadr/filedownloadr.class.php : 1504) PHP notice: Undefined index: mediaSourceId

p.s the file is downloaded via http

pashajanx commented 8 years ago

will bug fix?

squarou commented 8 years ago

Related to #50 I've got the same message : (ERROR @ /home/xxx/www/core/xpdo/om/xpdoobject.class.php : 811) fdPaths: Attempt to set NOT NULL field media_source_id to NULL using http protocol Modx 2.5 Mysql 5.5.46 php 5.6.21

pashajanx commented 8 years ago

How soon will bug fix?

Tyreal74 commented 8 years ago

I've also hit this issue, seems isolated to only using hashed URL's - using the the &directLink switch will still work and download the file.

azeller commented 8 years ago

however, it's a great thing to use the hash to not expose your filesystem like that. +1 here btw. I also have this error in the logs of several clients. PHP 5.6.something, switching to PHP7 in the near future.

globian commented 7 years ago

i've also same Problem, fdPaths: Attempt to set NOT NULL field media_source_id to NULL, although i used PHP7 !!!!

elendil-software commented 7 years ago

Same error here.

MODX 2.5.5-pl PHP : 5.5.x MySQL : 5.5.41-MariaDB

Onixarts commented 7 years ago

Still not fixed? Just updated to 2.0 and get [[+count]] equals 0. Same error in log.

redbull10 commented 7 years ago

This issue celebrates one year birthday today! 🥇

globian commented 6 years ago

MODX 2.6.0-pl PHP : 7.0.1

i have same Problem, Attempt to set NOT NULL field media_source_id to NULL, although i used PHP7 !!!!

zirmer commented 6 years ago

Get the same error. Could it be a problem with large files (files > 1 GB)? The download link is not parsed on files larger > 1 GB. Is this a MODX problem?

azeller commented 5 years ago

Any workarounds? We're trying to fix this for a client and this happens only with FileDownloadLink. Downloading the file works, however the count variable stays zero.

Some more info: The reason for the count staying 0 is probably that it writes the link to the database without the hash and the request parameter. It is just the absolute link to the site containing the files.

If anyone managed to work around this, I would be happy to hear, how.