We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
    Quote from: lossendae at Jul 22, 2009, 10:44 AM

    I’m testing getResources with the beta 2.
    The snippet return nothing, plus the drag n drop from the accordion don’t show the available properties.
    MODx Error log return :
    [2009-07-22 17:35:31] (ERROR @ E:\REVOLUTION\core\model\modx\processors\element\getinsertproperties.php : 24) PHP warning: Invalid argument supplied for foreach()

    Any idea what could be the problem?

    Not sure why it returns nothing, but I know that the current version of getResources doesn’t have properties packaged in yet. From what Jason has said, that will come in the next release, which is soon to come.
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 26931
      • 2,314 Posts
      isn’t there already a Ditto Version (alpha) for MODx Revolution?

      http://modxcms.com/extras/package/96
      http://modxcms.com/forums/index.php?topic=37895
        • 17499 ☆ A M B ☆
        • 872 Posts
        I’ve heard good thing about getRessources, so i just wanted to test it.
        Ditto will be coming after (sooner now)

        @splittingred
        Weird. All the other snippets seems to work but getResources.
        I’ll try to play further with it on another machine and see if the probleme repeat itself.
          • 28215
          • 4,149 Posts
          Quote from: lossendae at Jul 22, 2009, 10:53 AM

          I’ve heard good thing about getRessources, so i just wanted to test it.
          Ditto will be coming after (sooner now)

          There’s a publically available alpha version of Ditto for Revolution: http://modxcms.com/extras/package/96


          Weird. All the other snippets seems to work but getResources.
          I’ll try to play further with it on another machine and see if the probleme repeat itself.

          That’s because the other snippets have Properties assigned to them. getResources did not; the Visual Tag Builder only works with Elements that have properties.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 21246
            • 55 Posts
            @lossendae - getReources is working for me and I have upgraded via SVN to MODx Revolution 2.0.0-beta-2 from beta 1. Check you call.

            Centos 5.3 w/ PHP 5.2.6 (alternative repo)
              • 17499 ☆ A M B ☆
              • 872 Posts
              Well, it seems that something is wrong with my configs.
              I’ve tried getResources from my workplace and at home, and it don’t work on both machines.
              And now i just encountered the same issue with quip. Even the debug call is not working!

              here are both calls:

              [[getResources? &parents=`1`]]
              [[Quip? &debug=`true` &tplquipComments=`commentsWrapper` &tplquipAddComment=`addComment` &tplquipComment=`comments`]]
              


              Ditto, wayfinder and googlesitemap works fine.
                • 17499 ☆ A M B ☆
                • 872 Posts
                getResources work now with beta3 smiley
                  • 32667
                  • 38 Posts
                  Quote from: lossendae at Jul 24, 2009, 04:47 AM

                  getResources work now with beta3 smiley

                  Did you change anything to get your setup to work?

                  I’m running MODx Revolution 2.0.0-beta-3 and getResources doesn’t output anything.

                  my call:
                  [[!getResources? &parents=`1` &tpl=`myTpl` &includeContent=`1`]]
                    • 17499 ☆ A M B ☆
                    • 872 Posts
                    Didn’t do anything special, just upgraded and tried it again.
                      • 18654
                      • 191 Posts
                      Quote from: netdoctor at Jul 04, 2009, 10:32 PM

                      First remove the &includeContent=`1` and see if the snippet returns an array. If you don’t get an array then you have an issue with the snippet and you will have to look at your settings.

                      If an array is returned then create a template chunk like you would with ditto.

                      [[getResources? &parents=`1` &tpl=`myTpl`]]


                      Here is an example of a simple chunk
                      
                      <h2>[[+pagetitle]]</h2>
                      <p>
                      [[+introtext]] - <a class="readmore" href="[[~[[+id]]]]" title="[[+pagetitle]]">read more ..</a>
                      </p></p>
                      
                      

                      Read the comments in the snippet for more info and look at the return on the array for your placeholders.

                      Re: the link in the chunk.. Links in Revo are [[~id]] and the placeholder from getResources is [[+id]] so wrap it as shown in the code example above.

                      The snippet is working for me.
                      Revo Beta 1
                      getResources snippet : version 1.0.0-beta


                      netdoctor - thanks for the sample code - it’s exactly what I was looking for. I couldn’t figure out how to utilize the snippet, but now it’s working great! It looks like this will be a very useful bit of code.
                        God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.