We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36788
    • 75 Posts
    After update to the latest 2.2.9 version of Modx, I found that the nested call of the snippet in rowTpl of wayfinder returns cached result for each sub directory.

    E.g. the call below:
     [[Wayfinder? &rowTpl=`@CODE:<img src="assets/images/150x150/[[randomChildField?&folder=`[[+id]]`]]"`]]

    in previous (2.2.8) version returned:

    folder 1 - image1
    folder 2 - image2
    folder 3 - image3

    in version 2.2.9 it returns:
    folder 1 - image1
    folder 2 - image1
    folder 3 - image1

    The only way to make it work in 2.2.9 is to call it not cached
     [[Wayfinder? &rowTpl=`@CODE:<img src="assets/images/150x150/[[!randomChildField?&folder=`[[+id]]`]]"`]]


    But I need the nested call cached(( Did i missed something?

      • 44883
      • 3 Posts
      Same issues here.

      After updating my client's MODX cloud from 2.2.8 to 2.2.9 the Wayfinder menu's that use any other startId then 0 will fail:

      [[Wayfinder? &startId=`[[!UltimateParent]]` &level=`2` &selfClass=`active_here` &hideSubMenus=`0` &displayStart=`1` &startItemTpl=`navStartItemTpl` &rowTpl=`navRowTpl` ]]


      FAILS, Gives only the StartItem using the StartItem template


      [[Wayfinder? &startId=`16` &level=`1` &displayStart=`1` &hideSubMenus=`0` &startItemTpl=`navStartItemFooterTpl` &rowTpl=`navRowTpl`]]


      FAILS, Gives only the StartItem using the StartItem template

      [[Wayfinder? &startId=`0` &level=`2` &rowTpl=`navRowTpl` &parentRowTpl=`navParentRowTpl` &outerClass=`navigation_toggle_contgainer`]]


      WORKS, so I think the error is definately with the startId.


      Will submit a bug
        • 37032
        • 64 Posts
        When I try the call without any custom templates it works.
          • 40045
          • 534 Posts
          There are now several tickets filed in the tracker for this issue:

          http://bugs.modx.com/issues/10157
          http://bugs.modx.com/issues/10154
          http://bugs.modx.com/issues/10211

          and in the comment of this pull there are details how it was tracked down:

          https://github.com/roryg/ElementHelper/pull/16

          at the time the only way to make this work with 2.2.9 is to revert back the changes in the parser logic to 2.2.8
            • 22303 MODX Staff
            • 10,725 Posts
            So far, the only time I can reproduce this is if I'm using a Chunk that is set as Static, and is associated with a Media Source. Don't use a media source to access your static chunks (you can use element_static_path Setting without a media source for relative paths, defaults to MODX_CORE_PATH . 'components/') and it works fine.

            This seems to be a bug with how Wayfinder is processing things (it is circumventing normal parsing in some cases) that was only revealed by the bug fix implemented in the parser for 2.2.9. I am trying to track exactly why this is only happening with Static Chunks assigned to a Media Source...
              • 40045
              • 534 Posts
              Quote from: opengeek at Sep 19, 2013, 07:22 AM
              So far, the only time I can reproduce this is if I'm using a Chunk that is set as Static, and is associated with a Media Source. Don't use a media source to access your static chunks (you can use element_static_path Setting without a media source for relative paths, defaults to MODX_CORE_PATH . 'components/') and it works fine.

              This seems to be a bug with how Wayfinder is processing things (it is circumventing normal parsing in some cases) that was only revealed by the bug fix implemented in the parser for 2.2.9. I am trying to track exactly why this is only happening with Static Chunks assigned to a Media Source...

              This renders some problems with the very helpful Extra ElementHelper, which by default assigns a media source of 1 to the created elements...if this is not recommended in general (setting a media source for static elements), then why do we even have the possibility, e.g. the dropdown field in the element edit screen? Does this problem only occur with wayfinder due the "special" parsing of the snippet or could this also be a problem with other extras?
                • 27687
                • 2 Posts
                Hi all,

                i'am working with MODX Revolution 2.2.9 and wayfinder 2.3.3. on my local machine
                Now i'am trying to make all my chunks, snippets, templates and tvs static, but when I do it with wayfinder chunks, submenus will not render. Than I found this thread and removed from my chunks associations with media sources.
                All chunks(files) are saved in location like Jason Coward said now, in MODX_CORE_PATH . 'components/'...

                Now i can see, that I have two copies of my chunks. One in folder, where I upload it and which I selected in manager - in "assets/chunks/"
                and the second was created to "core/components" folder ("core/components/assets/chunks" exactly).
                Frontend uses the file I selected in manager - "assets/chunks/", but
                backend uses (in content field) the file in - "core/components/assets/chunks"
                So maybe there is problem with filepath, when you don't use modia sources.
                Should i change something in modx configuration? Tomorrow, I have to look at that.

                But still, nothing changed with submenus, they are not rendering.

                All other things with static files looks ok, but i didn't test it to much yet.
                To have possibility to make all pieces static is realy fantastic idea.

                Thanks you for all related informations to this problem and of course, to MODX team for great job, they are doing. [ed. note: smahel last edited this post 13 years ago.]
                  • 3186 ☆ A M B ☆
                  • 279 Posts
                  FIXED IT!! Merge request done
                  https://github.com/modxcms/revolution/pull/630
                  Such a little fix!!
                    MODX Ambassador (NL) & Professional MODX developer
                    Follow me on Twitter | Visit my page on Facebook | View my code on Github | View my script posts
                    MODX e-commerce solution SimpleCart
                    • 27687
                    • 2 Posts
                    Hi all,
                    great job bertoost, thank you, it saved my time.

                    l.smahel


                      • 22303 MODX Staff
                      • 10,725 Posts
                      Here is a patch that fixes the source of the issue and does not circumvent the solution to the original bug that was fixed when this bug was introduced...

                      https://github.com/modxcms/revolution/commit/5cd13cba13e52e888cff5a5209b4d88bb976daf5

                      This will be available in 2.2.10 shortly. Thanks bertoost for some pushes in the right direction.