We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18463
    • 121 Posts
    Martijn van Turnhout Reply #1, 15 years, 5 months ago
    Hi,

    I’m setting up a new site with MODx 2.0.8 and I’m using several TVs, with input type as "image" and output type as "default". In my System Settings, the filemanager settings are as follows:

    filemanager_path - assets/files/
    filemanager_path_relative - yes
    
    filemanager_url - assets/files/
    filemanager_url_relative - yes
    
    strip_image_paths - yes
    


    This is what I’ve put in all my HTML templates:

    <base href="[[++site_url]]">
    


    I’m uploading images in the folder assets/files/Slideshow/. However, the output of the TV image url is always: Slideshow/bg_slide.jpg. So that’s a big no. It should be assets/files/Slideshow/bg_slide.jpg. So I’m getting a lot of errors in my page.

    How can I fix this?

    I’m using MODX 2.0.8.
    PHP Version 5.2.8
    MySQL Version 5.0.92
      • 11055 ☆ A M B ☆
      • 3,112 Posts
      how do you put the tv tag on the HTML code?
        Rico
        Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
        MODx is great, but knowing how to use it well makes it perfect!

        www.virtudraft.com

        Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

        Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

        Maintainter/contributor of Babel

        Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
        • 18463
        • 121 Posts
        Martijn van Turnhout Reply #3, 15 years, 5 months ago
        Good thinking. It’s this:

        <img src="[[*slide1_image]]" width="960" height="332" alt="">
        <div class="slide_text">
          <h2>[[*slide1_heading]]</h2>
          <p>[[*slide1_text]]</p>
        </div>
        


        Okay, you’re right. I could solve it by changing the <img> like this:

        <img src="assets/files/[[*slide1_image]]" width="960" height="332" alt="">
        


        That works. Okay. But the output of the image TV itself should be different, right? It should generate the full path, "assets/files/" included, if I’m not mistaken.
          • 28215
          • 4,149 Posts
          I think this is a bug in 2.0.x; this has been solved with Image TV’s and TV Input Options in the 2.1.x branch.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 18463
            • 121 Posts
            Martijn van Turnhout Reply #5, 15 years, 5 months ago
            That’s great news, thanks!
              • 28215
              • 4,149 Posts
              No problem. Image/File TVs are *much* more powerful in 2.1 - you can restrict specifically what directory they can see.
                shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                • 18463
                • 121 Posts
                Martijn van Turnhout Reply #7, 15 years, 5 months ago
                Hi Shaun,

                just wondering: I’m using Revo 2.1 RC1 for one of my sites. Bad, I know, I should wait for the final release, but still... the problem I described in this thread is still present in that version. When I’m setting filemanager_path to assets/files/, the TV image URL still outputs the image location without "assets/files/". The same goes for files ofcourse.

                This has been fixed in RC2 right? Just wondering. smiley Thanks in advance.
                  • 28215
                  • 4,149 Posts
                  Martin, can you clarify what your filemanager_* settings are (all 4 of em)?

                  There have been some fixes, yes, but it should still output the whole URL properly. In the manager it will only show the relative URL, but when you put the TV in the document and on the front-end, it will render the full URL.
                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                    • 18463
                    • 121 Posts
                    Martijn van Turnhout Reply #9, 15 years, 5 months ago
                    These are the system settings I’m using so that the URL of the Image TV outputs the whole URL, including assets/files/.

                    filemanager_path: [blank]
                    filemanager_path_relative: yes
                    filemanager_url: [blank]
                    filemanager_url_relative: yes
                    


                    These are the settings for the Image TV input options:

                    Input type: image
                    Base Path: [blank]
                    Base Path Relative: yes
                    Base URL: [blank]
                    Base URL Relative: yes
                    


                    The above situation is the one that works. However, I’d like to give the Filemanager only access to the assets/files/ directory. A lot safer for the client. I’m doing that by modifying the following value:

                    filemanager_path: [b]assets/files/[/b]
                    filemanager_path_relative: yes
                    filemanager_url: [blank]
                    filemanager_url_relative: yes
                    


                    This way, the Filemanager does exactly what I want it to. But the output of new Image and File TVs, after I modified that setting, doesn’t include assets/files/ anymore.

                    I hope I’ve made myself clear.
                      • 18463
                      • 121 Posts
                      Martijn van Turnhout Reply #10, 15 years, 5 months ago
                      Also, when I have set my "filemanager_path" to "assets/files/", proper thumbnails of images appear inside the filemanager. When I haven’t set this path, all I get are blank thumbnails. I don’t know exactly what the problem is. I’ve already reported this last bug a couple of weeks ago, by the way.

                      Shaun, would it help you if I send you the login data for this specific website through a PM? You could check out the problem by yourself then.