We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8471
    • 333 Posts
    Quote from: kylej at May 02, 2006, 08:09 AM

    edipo, can you post the snippet call you are using so I can try it with the options you are using?
    [!FileDownload?getFolder=`download` &chkDesc=`fileinfo` &tplList=`FileDownload` &useHlt=`1` &downloadCount=`1` &userSort=`type` &sortOrder=`desc` &browseDirectories=`true`!]
    Quote from: kylej

    also, have you upgraded to 0.9.2.1?
    No I haven’t upgrade modx, I have the 0.9.1
      Sorry for my bad English grin
      • 10487 MODX Staff
      • 1,535 Posts
      @Kyle - I might be able to help you here if it’s what I think it is (had the same issue with my Polls Module recently wink ):

      If you’re using [~[*id*]~] to get the current page for the URL’s and such like, there are occasions (eg. where the tag is embedded deep into a template structure) when it won’t get parsed - resulting in the ’ID passed in request is NaN!’ error.

      The solution is to get the page ID by using $modx->makeURL() and outputting to a placeholder in the snippet.

      Just a thought anyway if all else checks out okay,

      Garry
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 15987
        • 786 Posts
        Thanks for the reply Garry, I am using [~[*id*]~] so I will try your fix to see if that takes care of it.

        edipo, I will have an update for you to try later today. Hopefully not to long, I need to get some work done though, so it may be a little while.

        Kyle
          • 15987
          • 786 Posts
          edipo,
          Did you update the files in your filedownload folder? I made some changes to the files: filedownload.inc.php and download.php

          I want to rule this out before changing the code.
            • 8471
            • 333 Posts
            Yes I have update all files, with the file of the 1.6 version
              Sorry for my bad English grin
              • 15987
              • 786 Posts
              Edipo,
              Here is an updated version. Let me know if it all works correctly.

              Kyle
                • 8471
                • 333 Posts
                I have the some error undecided
                  Sorry for my bad English grin
                  • 25787
                  • 14 Posts
                  I can’t seem to get the download count to work.
                  I created a file assets/filedownload/filecount.txt, which is initially blank (zero bytes).
                  I call the FileDownload snippet using the &downloadCount=’1’ parameter.
                  When I download a file, the counter (called using [+counter+] in the layout chunk) is not incremented by one (it remains zero regardless of how many times I download a file).

                  Am I missing something?

                  Thx
                  Ron
                    • 10487 MODX Staff
                    • 1,535 Posts
                    Hi Ron,

                    Just a couple of things to check that spring to mind:

                    1. Are you calling the snippet uncached? ie. using [!filedownload!]
                    2. Are you using backticks instead of single quotes when calling parameters in the snippet? eg. &downloadCount=`1`

                    Hope that helps, Garry
                      Garry Nutting
                      Senior Developer
                      MODX, LLC

                      Email: [email protected]
                      Twitter: @garryn
                      Web: modx.com
                      • 25787
                      • 14 Posts
                      Quote from: garryn at May 04, 2006, 03:15 PM

                      Hi Ron,

                      Just a couple of things to check that spring to mind:

                      1. Are you calling the snippet uncached? ie. using [!filedownload!]
                      2. Are you using backticks instead of single quotes when calling parameters in the snippet? eg. &downloadCount=`1`

                      Hope that helps, Garry

                      Am I right in understanding that I’m supposed to use [!xx!] and `1`, or should I avoid these and use [[xx]] and ’1’ instead? After reading your message, I tried both, and it doesn’t seem to make a difference. The download count still remains zero. Could it be an Apache, PHP, or MySQL setting?

                      Ron