We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47562
    • 113 Posts
    Wondering about the best way to track down why a symlink is not resolving correctly.

    Some details:
    Symlink resource is 48, nested a few levels deep
    Target resource is 153, also nested a few levels
    Verified that the target resource is published (and hidden from menus)

    Not sure why, but viewing the symlink page "site/x" does not redirect to the target page "site/y" as expected. The log doesn't show any issue. Can anyone shed light on what's going on here?

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

      • 47562
      • 113 Posts
      Can anyone confirm that symlinks work in 2.2.14?

      I'm trying to determine if there's a system setting I'm missing, or perhaps I'm completely missing how things should be working...
        • 33982 ☆ A M B ☆
        • 476 Posts
        Quote from: pauhana at Aug 01, 2014, 12:10 PM
        Can anyone confirm that symlinks work in 2.2.14?

        I'm trying to determine if there's a system setting I'm missing, or perhaps I'm completely missing how things should be working...

        So are you trying to redirect one MODX resource to another? In other words, if a visitor goes to:

        http://www.example-url.com/page1.html

        Are you wanting them to redirect to:

        http://www.example-url.com/page2.html

        Is that the case? If so, you should be using a weblink, not a symlink. You can read up on symlinks here:

        http://rtfm.modx.com/revolution/2.x/making-sites-with-modx/structuring-your-site/resources/symlink/using-resource-symlinks
          Precision Web Development ... SmashStack.com
          • 47562
          • 113 Posts
          If I want the same information made available from 2 different resources within the doc tree, isn't that done via a symlink? I'm using weblinks to refer to pages that are web pages outside the doc tree, and that works fine...

          I'll read through the docs again, and I suppose I could try to force things through a weblink(?)
            • 47562
            • 113 Posts
            A symlink is what I want; this describes what I'm trying to do to a T:

            ... you can not add additional content to it. You can create multiple Symlinks that point to the same resource, but each Symlink will have its own unique URL.
              • 33982 ☆ A M B ☆
              • 476 Posts
              Quote from: pauhana at Jul 30, 2014, 04:05 PM
              Not sure why, but viewing the symlink page "site/x" does not redirect to the target page "site/y" as expected. The log doesn't show any issue. Can anyone shed light on what's going on here?

              Can you clarify this a little more in light of your recent comments above? Are you trying to create a re-direct (which is what I assumed with reading the OP which is where a weblink comes in handy) or are you trying pull content from 1 page to multiple pages? (which is from what I'm reading the function of a symlink unless I misunderstood it)
                Precision Web Development ... SmashStack.com
                • 47562
                • 113 Posts
                Sorry, I probably confused the issue with the wording of that first post.

                I'm looking to access the same resource in two contexts, so I thought I would create a symlink to the first resource. Expected a link to the new resource to produce the same content as that of the original resource. Is this incorrect thinking?

                Thanks for your help.
                  • 33982 ☆ A M B ☆
                  • 476 Posts
                  Quote from: pauhana at Aug 01, 2014, 11:55 PM
                  I'm looking to access the same resource in two contexts, so I thought I would create a symlink to the first resource. Expected a link to the new resource to produce the same content as that of the original resource. Is this incorrect thinking?

                  When you say "two contexts", are you really using MODX "contexts" (http://rtfm.modx.com/revolution/2.x/administering-your-site/contexts) or do you mean that you're simply trying to pull content (i.e. Resource Content or a T.V. value) from one MODX resource to another MODX resource? Can you explain this a little more outlining exactly what you're attempting to do? That will help me help you.
                    Precision Web Development ... SmashStack.com
                    • 47562
                    • 113 Posts
                    Yes, sorry again; I need to learn to choose my words carefully.

                    Just two different places in the resource tree: I want both places to produce the same content.
                    • discuss.answer
                      • 33982 ☆ A M B ☆
                      • 476 Posts
                      Well, you could use getResources to pull data from one Resource in the MODX tree to another, but in our experience, this isn't the most efficient approach. What you're describing we do all the time to allow clients to update site-wide information in one MODX resource. Things like phone numbers or other content that needs to be editable in one place but populated site-wide we use this MODX extra:

                      http://modx.com/extras/package/setplaceholders
                        Precision Web Development ... SmashStack.com