We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Hi BobRay, First time using the NP snippet and Holy Cow. Wonderful and powerful snippet, thank you!

    I had identical errors as the OP on installation. MODX Revolution 2.6.5-pl and NP 3.0.4 pl.
    I have set the system setting np_login_id to the ID of my page with NP snippet call.
    I have left np_login_redirect set to Yes.

    The NP form loads and works as expected when I'm logged in to the manager (as sudo). But when I log out and reload the page I see:

    This page isn’t working dev.asite.cloud.com redirected you too many times.
    Try clearing your cookies.
    ERR_TOO_MANY_REDIRECTS


    Note: I've cleared cookies, cache, and tried different browser, etc.

    Should that page show a login form when no one is logged in?
    Or, am I supposed to build a login form on a separate page?
    I do not have the Login snippet installed - is it required? <-- I'm guessing this one's it...
      Lucy Iannotti
      Following Sea design & development
      http://www.following-sea.com
      New Bedford, MA
      • 3749
      • 24,544 Posts
      Lucy,

      Thanks for the kind words.

      First, by default, the NewsPublisher page is not visible to just anybody. Usually, you don't want all anonymous users in the world to be able to create and edit resources on your site. wink So you need the Login snippet and they need to be registered users.

      Second, it sounds like you're forwarding from your home page to the NewsPublisher page -- and your home page is also the error (page not found) page. That's not a good idea because users who aren't logged in to the front end will be sent back and forth between the site start page and the NewsPublisher page in an infinite loop -- hence the error.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 46886
        • 1,154 Posts
        Definitely make an error page, you can define it in system settings, core>site.

        You can make custom error pages within your site, but you still should have a dedicated error page for let's say general errors.
        • Thanks BobRay and Nuan88,

          There is an error page and it's configured in system settings so we can rule that out.

          BobRay -- I'm not forwarding from the home page. I understand that the edit resource form would not show to anon users; I assumed the login form would display to anon and then the NP edit resource form would display once logged in. At first I had thought we were meant to use the default MODX manager login form somehow... but it sounds like I have that piece of it wrong and the Login snippet is required, yes? So I'll install that and report back here.

          Thanks!
            Lucy Iannotti
            Following Sea design & development
            http://www.following-sea.com
            New Bedford, MA
            • 3749
            • 24,544 Posts
            Make sure the page set in the error_page System Setting is not the same as the one in the site_start System Setting, and make sure the error_page doesn't redirect anywhere (e.g., the NewsPublisher page). Also, make sure your error_page is published and not protected by any permission settings.

            And, yes, install the Login snippet and use that.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
            • Some progress: I have Login snippet installed and a login form that successfully logs in and redirects to the correct page.
              BUT this only works if you start from the login page when not logged in. If you try to load the NP page when not logged in, I now see a 404, although that page used to redirect a not-logged in user to the login form. Not sure what changed.

              I am having trouble with elFinder but will keep that in my other post.
                Lucy Iannotti
                Following Sea design & development
                http://www.following-sea.com
                New Bedford, MA
                • 3749
                • 24,544 Posts
                Be sure you've set these System Settings in the NewsPublisher namespace (replace ## with the ID of the Login page):

                np_login_redirect=`1`
                np_login_id=`##`
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                • Yes, they are and triple-checked.
                  The np_login_redirect is set to Yes since the options are Yes and No, not 1 and 0. I assume that's ok.
                  Still getting a 404 on the NP page when not logged in.

                  Maybe related, but probably a Login snippet issue - I have placed a logout link on the NP page; it seems to logout and redirects to the correct page, but user is not actually logged out. Can navigate back to the page with NP form displayed.
                    Lucy Iannotti
                    Following Sea design & development
                    http://www.following-sea.com
                    New Bedford, MA
                    • 3749
                    • 24,544 Posts
                    Is the NewsPublisher page protected by any ACL entries?
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting