We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18373 ☆ A M B ☆
    • 3,141 Posts
    I think there's just not enough data for the snippet to compare with.. too specific?

    It's looking for these terms only:

    • gemeente woerkum
    • onze
    • diensten

    In the resource parents 16 and 30.

    The only resource fields it tries to find those terms in is the longtitle, and your "tags" TV. Doesn't sound like a lot of opportunity to find anything related..

    You can try extending the field search (that may add more words to the match data as well) to include the pagetitle, or even the introtext or a summary TV.

    If you are 110% sure there is matching data (so resources with one of those three terms, with as parent resource 16 or 30) I'd like to see it for myself, and tinker with the snippet a bit to see if it's a bug somewhere.
    Could you email me at hello a-t markhamstra.com in that case? If you can share a manager login that would be great, else we could set up a quick Teamviewer session in which I look at the manager through your screen.
      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
      • 36738
      • 14 Posts
      Yeah I don't understand why there is no result when using the &parents property.

      I've attached 4 screenshots to this post, maybe they will help you out!


      I can't give you the login of the modx manager because It's for the company I work for.
        • 18373 ☆ A M B ☆
        • 3,141 Posts
        Alright - someone else with issues with the &parents property made me dive a little deeper. In this case the Articles plugin helped getting to the point which was causing the issue...

        Can you try this and let me know if it fixed it for you, before I push a new version to the repo?

        core/components/getrelated/model/getrelated.class.php, line 70
                    $a = array();

        change it to
                    $a = $this->config['parents'];


        Lil' bit of background:

        The $a variable there is used to collect all children IDs of the parents specified. But the $modx->getChildIDs method doesnt return the parent, so it would only look for sub-sub resources.

        Actually, I went ahead and released a new version. 1.1.1 is now available from the extras repo.

        ++++++++++++++++++++++++++++++++++++
        ++                                ++
        ++    getRelated 1.1.1-pl         ++
        ++         Released: 10/12/2011   ++
        ++                                ++
        ++++++++++++++++++++++++++++++++++++
        Fix issue with &parents which wouldn't find direct descendants.
        Prevent error messages (and possible failure) if only one resource field is chosen.
        [ed. note: markh last edited this post 14 years, 9 months ago.]
          Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

          Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
          • 37565
          • 5 Posts
          Hello!
          I tried to use your plugin on my website. My site is in Russian, and your plugin is not working. I've done this:
          1. I opened the file /core/components/getrelated/model/getrelated.class.php.
          2. And change the line
          $v = preg_replace('/[^a-z0-9\s]/', '', strtolower($v));
          to line
          $v = preg_replace('[^А-Яа-яЁёa-z0-9]', '', strtolower($v));
          p.s. Sorry for my language, I use a translator. [ed. note: createit last edited this post 14 years, 9 months ago.]
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            Hi createit, thanks for posting that! I'll take it for a spin and see if I can incorporate that in the actual package for the next version. Perhaps we can also get someone to contribute something that works for Japanese and also add that.

            Thanks!
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 1343 ☆ A M B ☆
              • 2,213 Posts
              Just a thought, but couldn't some of the settings/code used for FURL generation be reused here? That or add a system setting to allow on the fly customization instead of hard coding it?
                Patrick | Server Wrangler
                About Me: Website | Tweets |  MODX Hosting
                • 18373 ☆ A M B ☆
                • 3,141 Posts
                Great thought. Thanks!
                  Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                  Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                  • 18373 ☆ A M B ☆
                  • 3,141 Posts
                  Looks like I missed your post.

                  You'd have to do 2 getRelated calls for that specifying different &parents


                  New version released:
                  ++++++++++++++++++++++++++++++++++++
                  ++                                ++
                  ++    getRelated 1.1.2-pl         ++
                  ++         Released: 21/01/2012   ++
                  ++                                ++
                  ++++++++++++++++++++++++++++++++++++
                  Fix including deleted resources by adding &includeDeleted property defaulting to false.
                  Add &hideContainers property to allow filtering out of containers.
                  Prevent E_NOTICE errors on calculating the scores.
                    Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                    Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                    • 18373 ☆ A M B ☆
                    • 3,141 Posts
                    Quote from: createit at Dec 11, 2011, 11:37 PM
                    Hello!
                    I tried to use your plugin on my website. My site is in Russian, and your plugin is not working. I've done this:
                    1. I opened the file /core/components/getrelated/model/getrelated.class.php.
                    2. And change the line
                    $v = preg_replace('/[^a-z0-9\s]/', '', strtolower($v));
                    to line
                    $v = preg_replace('[^А-Яа-яЁёa-z0-9]', '', strtolower($v));
                    p.s. Sorry for my language, I use a translator.

                    I totally missed this in today's release, but I've added in on git now so it'll be out in the next release for sure now smiley Did have to make some minor changes to what you posted, but you can see the exact commit here: https://github.com/Mark-H/getRelated/commit/6d12859a926c3db19a48d875a6e0b43ec55d2c1d
                      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                      • 38575
                      • 5 Posts
                      Hello!
                      I tried to do so as it is written in the manual (https://github.com/Mark-H/getRelated/commit/6d12859a926c3db19a48d875a6e0b43ec55d2c1d), but nothing works. Instead, the results you want a message: "No related pages found."

                      Call the snippet:

                      [[getRelated?
                      &fields=`pagetitle:3,introtext:2`
                      &hideContainers=`1`
                      &limit=`5`
                      &tplOuter=`newsTplRelatedNews`
                      &tplRow=`newsTplRelatedNewsRow`
                      ]]

                      Thanks for your help.