We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23510
    • 168 Posts
    I'm trying to figure out why modx sometimes (yes, it seems inconsistent) prepends the filename insside a file TV box with ./

    Why does it happen? On the front end I end up with an url like:

    /assets/docs/./myfile.pdf

    Maybe it has something to do with Media Sources?

    Thanks - hopefully someone can point me to a post (tried searching).
      • 3749
      • 24,544 Posts
      Media Sources were my first thought. See what's on the Media Source tab when you edit the TVs and check the settings of the listed Media Sources.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        I saw something like this on a WordPress site when one of the paths involved was set to "/Volumes/Users/etc/" instead of just starting at "/Users/". What environment are you running on?
          • 23510
          • 168 Posts
          Here is what I have for my media source:

          basePath
          assets/docs/

          basePathRelative
          Yes

          baseURL
          assets/docs/

          baseUrlRelative
          Yes


          I notice that the first time I create a resource and attach a file to the TV, it does it without the ./ but when I go back in to edit to change the file, it appends the ./ but this too is inconsistent.