We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46580
    • 167 Posts
    I'm searching a way to get resource list with Tagger (http://rtfm.modx.com/extras/revo/tagger) extra + modx 2.3

    I have a problem with TaggerGetResourcesWhere snippet : it doesn't return anything :
    [[!getResources?  &where=`[[!TaggerGetResourcesWhere? &tags=`webdesign`]]` &tpl=`wtpl.gres.row`]]
    

    Any feedback with modx 2.3 ?

    GetResources : 2.3
    Tagger : 1.5 [ed. note: johnxx last edited this post 9 years, 7 months ago.]
      MODX lover
      -
      Développeur MODX / Webdesign / Solutions web
      • 44032
      • 7 Posts
      Hi johnxx,

      I'm having the exact same problem with modx 2.3 and tagger 1.5.

      I got the snippet to print out the value of the &tags parameter which are passed in correctly but at the end of the snippet on line 111

      if (count($tagIDs) == 0) {
          $tagIDs[] = 0;
      }


      the $tagIDs returned = 0.

      Have you got any further with this?
        • 44032
        • 7 Posts
        Hi johnxx,

        I'm having the exact same problem with modx 2.3 and tagger 1.5.

        I got the snippet to print out the value of the &tags parameter which are passed in correctly but at the end of the snippet on line 111

        if (count($tagIDs) == 0) {
            $tagIDs[] = 0;
        }


        the $tagIDs returned = 0.

        Have you got any further with this?
          • 46580
          • 167 Posts
          Sorry, I have no solutions for the moment. I'll post here asap if I find it.
            MODX lover
            -
            Développeur MODX / Webdesign / Solutions web
            • 7367
            • 1 Posts
            Just a thought, I was struggling with this for several hours before I discovered that I had copied-and-pasted from several places and I had some <span> and <pre> statements buried in the code, got rid of them and it works fine now using modx 2.3 and tagger 1.5
              • 29661
              • 116 Posts
              Hi,

              try to run only [[!TaggerGetResourcesWhere? &tags=`webdesign`]] without getResources and check what you get. If there will be section "WHERE r.tag IN (0)" there is not tag with alias "webdesign".

              Let me know if that's not the case of your problem.
                --
                John
                @theboxer
                • 44032
                • 7 Posts
                Hi,
                It turned out that my problem was that I wanted to search with the name of the tag and not the alias, but I was using the wrong column name

                &tagField=`tag` is what I needed to use.


                Thanks very much for your help.
                  • 46580
                  • 167 Posts
                  Another test with another modx installation :
                  [[!getResources?
                  &tpl=`results-doc-row`
                  &depth=`0`
                  &showUnpublished=`1`
                  &showHidden=`1`
                  &limit=`100`
                  &includeTVs=`1`
                  &processTVs=`1`
                  &includeContent=`1`
                  &where=`[[!TaggerGetResourcesWhere? &tags=`trace` &groups=`1` &where=`{"isfolder": 0}`]]`
                  `]]
                  


                  > nothing

                  [[!TaggerGetResourcesWhere? &tags=`trace` &groups=`1` &where=`{"isfolder": 0}`]]


                  > {"isfolder":0,"0":"EXISTS (SELECT 1 FROM `modx_tagger_tag_resources` r WHERE r.tag IN (1) AND r.resource = modResource.id)"}

                  Tagged resources are in Collection (extra)
                    MODX lover
                    -
                    Développeur MODX / Webdesign / Solutions web
                    • 46580
                    • 167 Posts
                    [[!getResources?
                    &parents=`17`
                    &tpl=`results-doc-row`
                    &showUnpublished=`1`
                    &showHidden=`1`
                    &limit=`100`
                    &includeTVs=`1`
                    &processTVs=`1`
                    &includeContent=`1`
                    &where=`[[!TaggerGetResourcesWhere]]`
                    ]]


                    > works fine (&parents added)
                    > ok for [[~[[*id]]]]/tag/trace to show child resources of 17 tagged with "trace"
                      MODX lover
                      -
                      Développeur MODX / Webdesign / Solutions web