We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32025
    • 305 Posts
    Dayton Web Design Reply #1, 11 years ago
    First, I am using MODX Rev 2.2.6 basic installation with SEO URLs enabled, and the extras: FormIt and Login added on. I have found the login instructions here: http://rtfm.modx.com/display/ADDON/Login.Basic+Setup and have implemented into my site.

    I am trying to set up a password protected forum page for my client. Complete with the login plugin that shows the forum only after a user is logged in. I believe I have it set up correctly, but I have a structure issue. In most log in situations you see a log in page, and after you log in you are redirected to the content. If you are still logged in can come back to that page, the content still shows. If you log out then the login page shows again (even if you are on the content page). This is what I want.

    With my forum, if I am already logged in and I go to the login page, I am not redirected to the content (forum) page because I am already logged in, and the login page shows which just says logged in (instead of the content page showing). If you go the forum page directly without being logged in it shows the homepage instead of the login page.

    I followed the instructions for the addon and it seems to works correctly the first time you login. That is if you go directly to my login page, and log in, it will then redirect the the content page correctly. The problem is when the visitor comes back to this login page and they are already logged in that login page just says: Logout, intead of it actually showing the forum page (as the redirect is contained in the snipplet I believe).

    I have created a test account for anyone who wishes to see. The login URL is located at: http://www.pinecovecampground.com/login.html and you can use: tester and tester for username and password. The actual forum page (that I want a login form to show on unless they are logged in is located here: http://www.pinecovecampground.com/forum-staging-page.html

    Obviously this is a workflow issue. With my current problem I don't know whether to originally link the forum to the login page, or keep it on the forum staging page (which the instructions tell me to do so). I don't know if a setting is wrong and that's why my forum page shows the homepage if someone is logged out (instead of the login form) or I need to add another snipplet to the login page so it redirects to the forum (content) page IF someone is already logged in. I would like to ad the registration function, but have to get past this first. Any help would be greatly appreciated!
      Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
      • 32025
      • 305 Posts
      Dayton Web Design Reply #2, 11 years ago
      OK I think I found a workaround that works well, but its not perfect. In system settings under Area:Site there is a setting for: Error Page. I changed this id from my homepage to the login form page. Now when someone goes to the content (forum) page and they are unauthorized, it sends them directly to the login page.

      Instead of linking directly to the login page, I will now link directly to the content page (which is the way it should be). If they are logged in the page with authorized content will show (forum), if they are not logged in they get the error page which is now the login page. So to the user everything looks smooth. The only problem is all my error pages are redirected to that login form. Oh well my site is small and what does it matter if they are redirected to the homepage or login page if they get an error page.

      This workaround works well for those following, but once again you will not have the capability of having a sitewide error page outside of your login form. Now if only in these instructions I can have a note added that stated to set your Error Page to your login page, the instructions would be complete.
        Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/