goldsky / FileDownload-R

FileDownload snippet for MODX revolution
12 stars 7 forks source link

Count not working after upgrade to 2.0 #50

Open squarou opened 8 years ago

squarou commented 8 years ago

Is there a way to solve my problem ? I've lost all the counts of downloads and it's not working anymore since I've upgraded, where the values remains in db.

Here's the chunk used : [[!FileDownloadLink? &getFile=[[+file]] &countDownloads=1 &tplCode= [[+title:default=[[+filename]]]] | [[+sizeText]] - [[+date]]([[+count]] téléchargements)
&dateFormat=d-m-Y &toArray=0 ]]

Counts are reseted and are stuck to 0.

I've 3 tables in my db : fd_paths, fd_counts and fd_downloads

The counts are stored in fd_counts but not incrementing anymore.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/34390023-count-not-working-after-upgrade-to-2-0?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).
squarou commented 8 years ago

I've got this in the log :

core/xpdo/om/xpdoobject.class.php : 811) fdPaths: Attempt to set NOT NULL field media_source_id to NULL

dimsa commented 7 years ago

Hello. Have got this bug too. As quick solution you can fix this file core/components/filedownloadr/model/filedownloadr/filedownloadr.class.php Row 780: //'media_source_id' => $this->config['mediaSourceId'], Row 791: // 'media_source_id' => $this->config['mediaSourceId'],

squarou commented 7 years ago

Thanks you 👍

elendil-software commented 7 years ago

Thank you !