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

    With a basic getResources call I’m getting a dump of array properties. The snippet call ampersands are correct: [[!getResources? &parents='2' &:includeContent='1' ]]

    It seems the snippet is calling fine as various properties are showing correctly in the array in relation to the snippet parameters used. Here’s what I’m getting for each resource:

    Array
    (
    [tpl] =>
    [tplOdd] =>
    …
    [uri] =>
    [uri_override] => 0
    )

    Also I'm finding that when editing in Rich Text, the last parameter in the snippet call is having the full & stripped, being replaced by only '&'. I’ve tested this by swapping the last 2 properties around, it happens each time. Is this a TinyMCE thing? It doesn't seem to stop the snippet from working properly but it just seems a bit odd.

    Here's what’s running:
    Revo: 2.1.3
    Apache: 2.2.3
    MySQL: 5.0.77
    PHP: 5.2.17
    Red Hat Enterprise Linux 5 - 64 bit

    Thanks in advance
    Ian
      • 22303 MODX Staff
      • 10,725 Posts
      FWIW, if you have Resources with blank URI values and you are using Friendly URLs, you have a problem.
        • 34087
        • 4 Posts
        Good to know but that's not happening - at the moment I'm running this without FURL's, will do later, and I generally run automatic_alias
        Cheers though!
          • 3749
          • 24,544 Posts
          The array usually means that getResources is not finding the &tpl chunk or you've forgotten that property.
            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
            • 34087
            • 4 Posts
            Yep, sorted it, thanks.
            Guess if I'd looked further and saw this
            Calls without a &tpl property specify will just output an array listing of each resulting Resource and their fields.
            I wouldn't have needed to ...