On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • First of all I can't find any support thread for Tagger (http://modx.com/extras/package/tagger), so posting my question here.

    I'm using this snippets to make a list of related articles. This works well when I'm using one word tags: like: tax, economy, business. But when tags are two words like: global economy, tax low, international business, than snippets doesn't work:
     [[TaggerGetTags? &groups=`1` &resources=`[[*id]]` &rowTpl=`tagName` &toPlaceholder=`taglist` &separator=`,`]]
      [[!getResources?
                &parents=`[[%guidelines.id?  &namespace=`mylex`]],[[%KB.id?  &namespace=`mylex`]],[[%news.id?  &namespace=`mylex`]]`
                &tpl=`related-bottom-list`
                &depth=`0`
                &showHidden=`1`
                &limit=`8`
                &sortby=`{"publishedon":"DESC","createdon":"DESC"}`
                &includeContent=`1`
                &includeTVs=`1`
                &includeTVList=`Img`
                &where=`[[!TaggerGetResourcesWhere? &tags=`[[+taglist]]` &likeComparison=`1` ]]`
                ]] 
    


    As well I will not get any results when tags are in Russian (Cyrillic).

    I'm Running Revo 2.3.3, PHP: 5.3.24, MySQL: 5.1.73
    Database charset: utf8

    Please advice what can be the problem.

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

      Lucas from AroundCyprus.net
    • Check the database in PhpMyAdmin and make sure that all tables and text fields are really set to utf8. If not, see this: http://bobsguides.com/convert-db-utf8.html
        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
      • discuss.answer
        This may have been long-ago solved by this user but, after having run into the same issue, I have the solution to share:

        The trouble stems from the fact that there is an undocumented property within the TaggerGetResourcesWhere snippet ("tagField") which is set to "alias" by default. Intuitively, at least for myself and the above user, when generating a [[+taglist]] with the TaggerGetTags call, one would use the [[+tag]] placeholder in their rowTpl (and not [[+alias]]). When the tag is just one word this doesn't matter (unless for some reason you explicitly set a tag's alias to something other than its name), as matching in sql is normally non case sensitive. But multi-word tags such as "Global Economy" would have an alias of "global-economy," thus the mismatch.

        Bottom line: Either use [[+alias]] in your TaggerGetTags rowTpl, or set the "tagField" property in your TaggerGetResourcesWhere call to "tag." Arguably the former solution is probably best, as the alias is stripped of spaces and special characters that could potentially muddy up a search.
        • Quote from: smg6511v2 at Apr 12, 2016, 11:21 AM
          This may have been long-ago solved by this user but, after having run into the same issue, I have the solution to share:

          The trouble stems from the fact that there is an undocumented property within the TaggerGetResourcesWhere snippet ("tagField") which is set to "alias" by default. Intuitively, at least for myself and the above user, when generating a [[+taglist]] with the TaggerGetTags call, one would use the [[+tag]] placeholder in their rowTpl (and not [[+alias]]). When the tag is just one word this doesn't matter (unless for some reason you explicitly set a tag's alias to something other than its name), as matching in sql is normally non case sensitive. But multi-word tags such as "Global Economy" would have an alias of "global-economy," thus the mismatch.

          Bottom line: Either use [[+alias]] in your TaggerGetTags rowTpl, or set the "tagField" property in your TaggerGetResourcesWhere call to "tag." Arguably the former solution is probably best, as the alias is stripped of spaces and special characters that could potentially muddy up a search.

          I just had the same problem, so I added &tagField=`tag` in TaggerGetResourcesWhere to match tags with spaces. Thanks so much!
          Someone should really put that in the docs!