We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17394
    • 14 Posts
    Hi all,
    I am getting and error "Could not retrieve document site.com/assets/files/illustration.txt" when I use "@FILE assets/files/illustration.txt" in the default value of a TV. I want to display the contents of this file on my site. the files directory has 777 permissions and the illustration.txt has 644.

    Can you suggest me why Modx can not retrieve this document?

    Also, even if I remove this file binding in the default value and empty the cache, the page still shows "Could not retrieve document site.com/assets/files/illustration.txt" which is weird for me. How can it display this message if I am not asking to retrieve this document?
    Even if I change the default value to some random text, still the message persists!

    Awaiting your reply
    Thanks in advance smiley
      • 25132
      • 129 Posts
      Try to put in the entire path name, e.g.

      @FILE /html_root_folder/path/to/file.txt

      or whatever it is in your case and see if that works for you.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        When using a relative path like assets/files/xyz.txt ask yourself "relative to what?" When you are editing a resource, you are working in the /manager/ directory, from the /manager/index.php file. So your relative path must be relative to /manager/index.php; that would in this case be ../assets/files/xyz.txt
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org