We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37619
    • 79 Posts
    Hi everyone!

    I updated a site from Evo to Revo 2.2.15 using Provisioner, and I've been working on changing plugins (eForm to FormIt, getResources instead of Ditto, and so on), and I'm faced with a dilemma.

    I have a getResources call, and everything is being called except for the TVs.
    I've included in the call "&includeTVs=`1`" and "&processTVs=`1`", but they're still not showing up.
    I checked the Template Access and they are checked as they should.

    The TV I can't get to show up is an image. I created a new one, but this one still isn't showing up.
    So I created a test Text TV, but this one isn't showing up either!

    I cleared the cache, even deleted the /core/cache folder, and refreshed the page: still nothing.

    Finally, the weirdest thing of all, I've changed the template of the page I'm trying to get the TV to show up in, and when I refresh the page, the template is still the same as what it was before.

    Does anyone have any clue what could be the problem? I've built several MODX sites on the server that I'm using, so I doubt it's server related (btw, server is using Apache, has PHP installed, and all other MODX sites are working on the same server).

    Any insight would be helpful. Thanks!
    jm

    This question has been answered by jmbuytaert. See the first response.

      Jean-Marc Buytaert (@jmbuytaert)

      MODX truly is the greatest thing that's ever happened to the Internet.
      • 3749
      • 24,544 Posts
      I would try clearing the browser cache and cookies (or going incognito), then manually clearing the cache again. Leftover cookies are a frequent cause of Manager weirdness.

      About changing the template: It's easy to change the template but forget to save the resource afterwards. I've done it many times. The page reload makes you think you've saved things when you haven't. The template is not changed until you save the resource.

      I've also seen reported cases where a mismatched date/time setting will prevent template changes from sticking. SiteCheck will diagnose that for you (along with a lot of other things). It will also show you if you have any invalid modTemplateVarResource or modTemplateVarTemplate objects, which could be an issue (and a clue).





        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
        • 37619
        • 79 Posts
        Hi Bob Ray,

        Thanks for your prompt reply!

        I bought, installed, and ran SiteCheck, and I got no errors (except for SiteCheck Problem Resources (269) (modDocument), but that has nothing to do with my issue) – great plugin btw, thank you for coming up with that.

        However, I still get the same issue with the TV not showing up when being generated in getResources.

        Here is my getResources call:

        [[getResources?
            &depth=`0`
            &includeTVs=`1`
            &limit=`0`
            &parents=`47`
            &processTVs=`1`
            &sortby=`menuindex`
            &sortdir=`ASC`
            &tpl=`equipmentList`
        ]]
        


        The chunk equipmentList (below) is displaying all the html, but the TVs are still not showing up. The pagetitle and id are both showing up without any issue.

        equipmentList Chunk:
        <li>
            <h2><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
            <a href="[[~[[+id]]]]">
                [[+galleryImage1]]
                <!-- [[+galleryImage1:isnot=``:then=`<img src="[[+galleryImage1]]&f=png" alt="[[+pagetitle]]" width="140" />`:else=`<img src="[[+pageImage1]]&f=png" alt="[[+pagetitle]]" width="140" />`]] -->
            </a>
        </li>
        


        I've commented out line 5 (above) to see if anything was returning from the TV galleryImage1 just by itself (which does have a picture set for that one resource), but it's not even returning the image's url. I even tried changing the output to "text", still no success.

        About changing the template: It's easy to change the template but forget to save the resource afterwards. I've done it many times. The page reload makes you think you've saved things when you haven't. The template is not changed until you save the resource.
        As for the templates not changing, that was a mistake on my part.
        I've tried the getResources call cached and uncached.

        I would try clearing the browser cache and cookies (or going incognito), then manually clearing the cache again. Leftover cookies are a frequent cause of Manager weirdness.
        I've tried doing that: still nothing.

        Any idea?

        Thanks.
        jm
          Jean-Marc Buytaert (@jmbuytaert)

          MODX truly is the greatest thing that's ever happened to the Internet.
        • discuss.answer
          • 37619
          • 79 Posts
          I am so embarrassed I missed this: all I needed to do was add tv in front of the TV call in the template chunk: [[+tv.galleryImage1]]

          Thank you Bob for your help!
          jm
            Jean-Marc Buytaert (@jmbuytaert)

            MODX truly is the greatest thing that's ever happened to the Internet.
            • 3749
            • 24,544 Posts
            It's a common mistake. Adding &tvPrefix=`` to the tag would also have fixed it. Depending on the names of your TVs and what else you have installed, it's not a bad idea to use a unique prefix for them.
              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