Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pashajanx opened this issue May 18, 2016 · 15 comments
Open

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

pashajanx opened this issue May 18, 2016 · 15 comments
Labels

Comments

@pashajanx
Copy link

pashajanx commented May 18, 2016

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
Copy link
Owner

goldsky commented May 19, 2016

PHP version?

@goldsky goldsky added the bug label May 19, 2016
@pashajanx
Copy link
Author

5.4.45

@pashajanx
Copy link
Author

pashajanx commented May 19, 2016

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
Copy link
Author

will bug fix?

@squarou
Copy link

squarou commented May 26, 2016

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
Copy link
Author

How soon will bug fix?

@Tyreal74
Copy link

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
Copy link

azeller commented Oct 30, 2016

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
Copy link

globian commented Nov 14, 2016

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

@elendil-software
Copy link

Same error here.

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

@Onixarts
Copy link

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

@redbull10
Copy link

This issue celebrates one year birthday today! 🥇

@globian
Copy link

globian commented Nov 17, 2017

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
Copy link

zirmer commented Dec 4, 2017

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
Copy link

azeller commented May 13, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants