We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18654
    • 191 Posts
    Quote from: nklsf at Jul 06, 2010, 05:00 PM

    Well, actually it is an empty template. I just assigned it to have the possibility to assign TVs to the ressource.

    Quote from: splittingred at Jul 06, 2010, 05:29 PM

    You should only have this in the Template:

    [[*content]]
    

    So empty templates will not work with binary downloads? Is that by design? Don’t empty templates display [[*content]] by default anyway?
      God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
      • 28215
      • 4,149 Posts
      No, they don’t. You have to specify where [[*content]] goes, even in empty templates.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 21635
        • 81 Posts
        okay, i now filled in [[*content]], but still

        if i assign html-content-type the pdf-file gets rendered as text

        if i assign pdf-content-type i get server script error 500.

        Quote from: splittingred at Jul 06, 2010, 08:43 PM

        No, they don’t. You have to specify where [[*content]] goes, even in empty templates.

        so basically what modx does, is to take the content of the external pdf file and render a new pdf-file with new header and external pdf-content? why doesn’t it just forward to the document in the file system? makes most sense for binary files, i think...
          • 22303 MODX Staff
          • 10,725 Posts
          It can’t forward to the files, they would have to be directly accessible by the browser which would defeat the purpose of using Static Resources (i.e. security access controls, being able to keep them outside the document root of the web server, etc.).

          This is working perfectly for me with both inline and attachment dispositions, in every browser I pull up. No 500 errors, so I think there must be something else causing your problems here.
            • 21635
            • 81 Posts
            Quote from: OpenGeek at Jul 07, 2010, 10:29 AM

            No 500 errors, so I think there must be something else causing your problems here.

            Any hints what areas are being touched by the process, so i could check my configuration?
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: nklsf at Jul 08, 2010, 07:46 AM

              Quote from: OpenGeek at Jul 07, 2010, 10:29 AM

              No 500 errors, so I think there must be something else causing your problems here.

              Any hints what areas are being touched by the process, so i could check my configuration?
              Disable any plugins you have maybe?
                • 21635
                • 81 Posts
                Disable any plugins you have maybe?

                All plugins disabled, still error 500.

                Now installed a a fresh-rc3 install on another server and i see the same thing happening:

                choose html-content type: render pdf as text
                pdf content-type: error 500

                frustrating...

                  • 22303 MODX Staff
                  • 10,725 Posts
                  I still can’t reproduce this. Can anyone else reproduce the problem? Does the PDF in question happen to be UTF-8 or is it a different encoding? Can you compare the headers on successful download of the file (i.e. direct access via web server) with those that are getting a 500 error as a static resource?
                    • 2611
                    • 394 Posts
                    Also, without spaces before or after right...? (or does revo clean this up automaticly?)
                      Follow me on twitter: @b03tz
                      Follow SCHERP Ontwikkeling on twitter: @scherpontwikkel
                      CodeMaster
                      • 21635
                      • 81 Posts
                      Quote from: b03tz at Jul 09, 2010, 09:48 AM

                      Also, without spaces before or after right...? (or does revo clean this up automaticly?)

                      before or after... what exactly?