We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49711
    • 8 Posts
    grayghost23 Reply #1, 9 years ago
    I have no idea what is going on here, but I have a slideshow built in mywebsite and a TV attached to the right template which allows the user to swap out one slider image that changes week to week. It just started disappearing on me about a month ago. I have tried a lot of ways to fix it but haven't come to a solution yet. When I modify the TV and hit save it shows up, but then disappears after a couple hours with a broken link. When I check the resource code it's empty where the TV content should be. The TV is input as an image and displayed as text. so I have:

    < img src="[[*mytv]]"/>

    I have also tried

    <img src="http://website.com/[[*mytv]]"/> to try the full link, still doesn't work

    I tried outputing the TV as image with no luck as well.

    I am really at a loss, I don't understand why it is just disappearing on me, but showing up right after I update it. Does anyone have any ideas what could be causing this?
      • 19872
      • 1,078 Posts
      How are the other slides getting populated. Are those hard coded on the template or in a chunk? Or are you using MIGx?

      Have you tried setting output type as: default
      [ed. note: mmcgee last edited this post 9 years ago.]
        • 19872
        • 1,078 Posts
        output type of image should generate the entire image tag.

        So try leaving as output type: image, but then only put you TV call in the template or chunk code.

        Instead of
        < img src="[[*mytv]]"/>
        , simply put [[*mytv]]
          • 3749
          • 24,544 Posts
          Try using mmcgee's method above and making it a text TV with default output rather than an image TV.

          If it's still a problem, I'd suspect an issue with nesting, the cache, and the parsing order. Once someone visits the page and it's cached, the TV tag may be parsed at a time when the TV is not available, giving you src="" in the HTML. This happens when you start nesting things too deeply (e.g., the tag is in a chunk that's inside another chunk and/or created with a snippet). Using output modifiers can also create that condition. [ed. note: BobRay last edited this post 9 years ago.]
            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
            • 49711
            • 8 Posts
            grayghost23 Reply #5, 9 years ago
            Yes, mmcgee, the other slides are hard coded into the chunk that the template calls. I'm not using MIGx for this (although I am using it for the video gallery on this site), since it's only one image that needs to be updated a week (for the new blog post the client makes). I have tried default settings, and I have tried what you suggested by just adding the TV [[*mytv]] in an image output.

            BobRay, I thought it might be a caching issue, but I wasn't sure. I have a template that is only for one page. In this case the home page. I have the slide images in a chunk called [[$slides]] and the tv is in that chunk so I didn't think it was nested too deeply. I have built other sites with far deeper nesting and have never ran into this problem.
              • 19872
              • 1,078 Posts
              Your set up does not sound too deep.

              Try putting the [[*mytv]] outside of the slider in addition to including it in the slider. If it works as a standalone on the page, but not in the slider, then you know it has something to do with your slider.

              Then other question I have not asked: Do you have any type of responsive image handling in the mix – like pThumb and pictureFill.js? Each jQuery slider requires specific markup, and I have found it to be pretty tedious connecting the dots in this scenario. pictureFill works for some sliders, whereas adaptive-images is a better fit for others.
                • 49711
                • 8 Posts
                grayghost23 Reply #7, 9 years ago
                Yes I do, I am using a jssor slider that does fit the image to the browser width. I will try adding that image outside of it that is a good idea thank you.
                  • 19872
                  • 1,078 Posts
                  If the one outside of the slider works. That is good. You know the TV works on a basic level.

                  Next task: Compare the source code of the stand-alone TV vs. the source code or required markup for your slider. Therein will be the solution. Make the TV output the source code the way the slider requires it. Might require use of a TV output modifier

                  If I understand what Bob is suggesting, a text TV would allow you to type in the path in the manner the slider requires the code. Exacting yes, but not as user-friendly as the Image TV type that prompts the user to go an find an image to load. I might be misunderstanding Bob's suggestion, so please forgive me if I am.