We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18367
    • 834 Posts
    Yeah thanks but,

    I already read your article several times.

    I tried doing what you described but nothing happened.

    There's something I'm just not getting, and because I'm not getting it, I don't know what it is. (aaargh).

    Not sure what to do now.


      Content Creator and Copywriter
      • 18367
      • 834 Posts
      Ok, progress of sorts.

      I'm now getting an error message when I try a test in the Vanilla proxy settings. Before I just got a blank page

      It doesn't seem like we were able to retrieve a logged-in session from the AuthenticateURL you specified. Please make sure you are logged in to your remote application before performing this test.

      If only I knew what to do about it.

      Next message

      Could not understand the ini response received from the AuthenticateURL. Your application is not responding in a way that ProxyConnect understands!



      [ed. note: markg last edited this post 11 years, 6 months ago.]
        Content Creator and Copywriter
      • 1. Vanillan and MODx must be using the same domain.

        2. You need to have MODx resources with aliases to match the URLs you give when configuring ProxyConnect.

        3. The page for handling the connection needs to have a blank template, and no content other than the snippet. The only thing it can output is the information that Vanilla wants. Test it by manually entering its URL into the browser address bar. It should show some of your user information (taken from the SESSION).
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 18367
          • 834 Posts
          1: Check, they are.

          2: I haven't turned on friendly urls yet, so I'm using the www.mydomain//index.php?id=23
          Does that matter?

          3: Yes the page has a blank template and only the snippet, but when I try the page it's just blank.
            Content Creator and Copywriter
          • Are you logged in as a web user?

            The page should show the three items the snippet returns.

            if(isset($_SESSION['webInternalKey'])) {
            $output = "UniqueID=" . $_SESSION['webInternalKey'] . "\n\n";
            $output .= "Name=" . $_SESSION['webShortname'] . "\n\n";
            $output .= "Email=" . $_SESSION['webEmail'] . "\n\n";
            return $output;
            }
            return;


            UniqueID=2
            [email protected]
            [email protected]
            [ed. note: sottwell last edited this post 11 years, 6 months ago.]
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 18367
              • 834 Posts
              Yes I'm logged in as a user, and I'm still not seeing anything.

              But I'm guessing because the Proxy Connect couldn't understand the ini response, there must be something amiss elsewhere.
                Content Creator and Copywriter
              • If you directly access the page and don't get the three items displayed, then there is your first problem.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 18367
                  • 834 Posts
                  OK, so where do I look to fix it?

                  I've just double checked my snippet and it's the same as yours above.

                  When I look at the source of the page there's nothing there.

                    Content Creator and Copywriter
                    • 18367
                    • 834 Posts
                    Maybe this will help

                    Here's my call
                    [[vanilla1]]
                    There's nothing else on the page.

                    Here's my snippet

                    <?php
                    if(isset($_SESSION['webInternalKey'])) {
                    $output = "UniqueID=" . $_SESSION['webInternalKey'] . "\n\n";
                    $output .= "Name=" . $_SESSION['webShortname'] . "\n\n";
                    $output .= "Email=" . $_SESSION['webEmail'] . "\n\n";
                    return $output;
                    }
                    return;


                    Here's my plugin

                    <?php
                    $e = &$modx->Event;
                     
                    switch($e->name) {
                        case 'OnWebLogout': // integrated logout
                                setcookie('Vanilla', ' ', time() - 3600, '/', 'http://www.hotbuttonmarketing.com.au');
                                unset($_COOKIE['Vanilla']);
                        break;
                    }


                    Does anything need to reference the plugin?
                      Content Creator and Copywriter
                    • Hm... this was for Evo, are you using Revo?
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org