goldsky/FileDownload-R

fdPaths: Attempt to set NOT NULL field media_source_id to NULL

pashajanx opened this issue · 15 comments

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

PHP version?

5.4.45

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

will bug fix?

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

How soon will bug fix?

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.

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.

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

Same error here.

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

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

This issue celebrates one year birthday today! 🥇

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

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?

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.