We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22656
    • 121 Posts
    I have a test document, with a snippet. the snippet contains the sendforward to homepage.
    $modx->sendForward(1);


    however, when I view this document, it just displays the blank page.
    If i comment out the sendforward the document displays fine.

    What could be the cause of this behaviour

    The only thing different in my setup is the fact every page belongs to a "default" resource group, viewable by anonym - some other pages had to be authentication protected.
      • 39932
      • 483 Posts
      Is the sendForward() moving across Contexts? If so, go to System Settings, find the key "allow_forward_across_contexts" and set it to "Yes".
        Website: Extended Dialog Development Blog: on Extended Dialog
        Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
        Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

        Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
        • 22656
        • 121 Posts
        nope, I have this flag already set as this is the ultimate goal, however forwarding was just being tested and its all in the same context.

        I can see that most of the times, people use the sendforward in plugins, rather than snippets on pages. Does this have anything to do with it?
        Error log is blank too...
          • 22303 MODX Staff
          • 10,725 Posts
          I cannot reproduce this problem; using sendForward() in a Snippet is working as expected in my tests. Can you provide more information?
            • 22656
            • 121 Posts
            how bizzare...
            i just created a brand new page, included the same snippet and it all works as it should.
            The old page still displays blank.
            investigating...
              • 22656
              • 121 Posts
              well, after playing with page options on the problem page, cacheable/uncacheable
              and a few other fields, i've changed the alias, saved and hit view - its forwarding correctly now as well.
              im at a loss as to why. No other configs were changed.
              The only other thing i can think of is my custom plugins, or supercache plugin messing with the cache...