We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39717
    • 14 Posts
    Hello, i am new to modx (MODX Revolution 2.2.4-pl (traditional)) and am in the process of setting things up and managing mostly okay, although it can be frustrating for newbies!! Am learning my way around though and seem to be making progress.

    Have successfully got membership groups going, and a front-end registration that seems to work fine for the most part.

    • members can register
    • activation email is sent with all the right info and links (after much fiddling but finally got it to work)
    • Members can log in successfully after activation

    So all of that is working properly. The only thing I can't figure out is the 'Registration Approved' Email. It sends out fine, but the content of it is all whacked....


    Dear xxxxx,
    Thanks for registering! To activate your new account, please click on the following link:
    [ [ +confirmUrl] ]
    After activating, you may login with your password and username:
    Username: xxxxxx
    Password: [ [ + password] ]
    If you did not request this message, please ignore it.
    Thanks,
    Site Admin


    I cannot figure out where to edit this or why it is sending the weird links, or is it possible not to send the approval at all since the member is already logged in??

    . i have these
    Membership Confirmation Handler (19) resource
    content: <p>[[ConfirmRegister? &redirectTo=`1`]]</p>


    where 1 is my homepage

    but am not sure if i am supposed to have something in the elements to go with it.


    Any help on this would be greatly appreciated, been at this now for 6 hours trying to get membership set up and have ironed out nearly all problems i think (I hope) and it is just this last one that i can't seem to get my head around.
    thanks [ed. note: jaccione last edited this post 11 years, 9 months ago.]
      • 3749
      • 24,544 Posts
      Normally, rather than sending an email to confirm registration, you forward the user to a page with a welcome message unless you are activating the users manually.



      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        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
        • 39717
        • 14 Posts
        Thanks for your speedy rely BobRay, and apologies if this sounds really dumb. I will confess to being quite overwhelmed by all of this.

        does that mean then in my Membership Confirmation Handler
        i shoudl change the code from
        <p>[[ConfirmRegister? &redirectTo=`1`]]</p>

        to
        <p>[[&redirectTo=`1`]]</p>


        or just
        <p>[[redirectTo=`1`]]</p>


        ???
          • 3749
          • 24,544 Posts
          No, the first one should be correct as long as you want to redirect them to the Resource with the ID of 1 (The Resource IDs are in parentheses next to the Resource name in the Resource tree on the left side of the Manager).

          You can redirect them to any page on the site, so I usually create a new page with "Congratulations, you're now a registered member" and redirect them there.

          Your other two examples wouldn't work because the first thing in a snippet tag has to be the name of an actual snippet and there's no redirectTo snippet. wink


          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            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
            • 39717
            • 14 Posts
            Thanks BobRay, that first piece of code i pulled directly from the tutorials and the redirect works fine, it is the email that is not good. I will take your advice and redirect to a confirmation page, instead of 1 which is the home page. I still can't figure out how to stop the email sending on confirmation, although i can just change the content so the weird non-functioning links aren't there.

            Or is it simply a matter of deleting ConfirmRegisterEmailTpl??
            which currently looks like this

            <p>Dear [[+username]],</p>
            
            Thanks for registering ! To activate your new account, please click on the following link:
            [[+confirmUrl]]
            
            
            
            <p>You may login with your password and username:</p>
            
            <p>
            Username: <strong>[[+username]]</strong><br />
            Password: <strong>[[+password]]</strong></p>
            
            <p>If you did not request this message, please ignore it.</p>
            
            <p>Thanks,<br />
            <em>Site Admin</em></p>


            where the password and url comes out wrong.

            I have been using a mix of tutorials and have found them to be conflicting and have decided to stick with the ones on http://rtfm.modx.com/ from now on, as i think this has been the cause of some of my problems in getting things set up.

            Thanks again for your time helping me!
              • 3749
              • 24,544 Posts
              Are you using the Register and ConfirmRegister snippets that are part of the Login package? If so, you should follow all the advice here: http://rtfm.modx.com/display/ADDON/Login.Register

              and here: http://rtfm.modx.com/display/ADDON/Login.ConfirmRegister


              It's easy to get confused because there are a number of separate resources with similar names and related properties -- one for displaying the Registration form, one for thanking the user for registering, one containing the ConfirmRegister snippet, and finally one that displays the "Registration Confirmed" message.

              I should also mention that the Subscribe package pretty much does everything you're working on for you, but if you want to try it, be sure to wait for the new version (due out in the next day or so if I can find time to deal with a few final issues) before installing it. You'll probably want to rename all your existing subscription-related pages (e.g., by putting an X in front of both the pagetitle and alias) before installing it, so you won't get them confused with the ones Subscribe creates and it won't use them.

              The Subscribe tutorial is here: http://bobsguides.com/subscribe-tutorial.html, though it's not quite up to date.


              ------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using.
              MODX info for everyone: http://bobsguides.com/modx.html
                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
                • 39717
                • 14 Posts
                I have looked at all the instructions and still find myself unable to figure out how to stop the confirm register from sending out the same email that the request membership sends out. i have followed the tutorials to the letter.

                Yes i am using Register and ConfirmRegister snippets that are part of the Login package

                This is the second install i have tried to do following the tutorials outlined and i don't know if i am missing the forest for the trees or doing something really stupid. The exact same problem persists.

                Everything works fine except that upon confirmaton of registration another email goes out that is unwanted and i am failing to see what controls the sending of that email. I have poured through the snippets which were downloaded from the login package:
                Register (17)
                require_once $modx->getOption('login.core_path',null,$modx->getOption('core_path').'components/login/').'model/login/login.class.php';
                $login = new Login($modx,$scriptProperties);
                
                $controller = $login->loadController('Register');
                $output = $controller->run($scriptProperties);
                return $output;


                ConfirmRegister (18 )
                require_once $modx->getOption('login.core_path',null,$modx->getOption('core_path').'components/login/').'model/login/login.class.php';
                $login = new Login($modx,$scriptProperties);
                
                $controller = $login->loadController('ConfirmRegister');
                $output = $controller->run($scriptProperties);
                return $output;

                The activation email goes out just fine, the url and links all work perfectly. The member is then registered and everything appears to be all good.

                My Membership Confirmation Handler (11) Resource
                <p>[[ConfirmRegister? &redirectTo=`12`]]</p>


                Where 12 is my Page that says membership is completed.

                Everything is fine and working, except for this unnecessary email which arrives after the activation link has been used and seems to be a duplicate of what is sent to activate the account. I just cant find out how to stop it sending, or what controls it being sent or its contents.

                Sorry if i am being extremely dumb here (that is how i am feeling) but after a day of fighting this i am still failing to see how to eliminate this extra unwanted email.

                The subject title of this email is: Registration Approved
                the content is
                Dear jac1,
                Thanks for registering! To activate your new account, please click on the following link:
                [[+confirmUrl]]
                After activating, you may login with your password and username:
                Username: jac1
                Password: [[+password]]
                If you did not request this message, please ignore it.
                Thanks,
                Site Admin
                


                I can see in my resource for my registration page the snippet that controls the activation email
                [[!Register?
                    &submitVar=`registerbtn`
                    &activationResourceId=`11`
                    &activationEmailTpl=`ActivationEmailTpl`
                    &activationEmailSubject=`Thanks for Registering at site.com!`
                    &submittedResourceId=`10`
                    &usergroups=`Members`
                ]]

                Which all works fine (all resources are correctly pointed to)
                But there doesnt appear to be any controls like that in the confirmregister snippet

                It appears that the username field comes thru correctly, but the password and confirm url dont (althoguh they do in the original activation email)


                thanks for any help and all help so far.

                  • 3749
                  • 24,544 Posts
                  Stuff like that can be really frustrating. I've definitely been there (sometimes for days at a time). On the plus side, the usual problem is that *no* email is sent, which is often a lot harder to diagnose.

                  Here's the critical thing to remember: The Register snippet is the only thing in the package that sends email, so it's clearly executing twice.

                  Here are some things that I think might cause that:


                  • The Register snippet's forwarding page is the page it's on or a non-existent page.
                  • Two copies of the Register snippet on the same page (scroll all the way to the bottom)
                  • The Register snippet tag is on some page other than the Register page
                  • You have the register and confirmRegister snippets on the same page (or one is in the page Template).
                  • The ConfirmResister page forwards the user to a page that contains the Register snippet.
                  • The Thanks for Registering page has the Register snippet on it.
                  • While testing you're hitting the "back" button on the Thanks for Registering page, and going back to the Register page.


                  ------------------------------------------------------------------------------------------
                  PLEASE, PLEASE specify the version of MODX you are using.
                  MODX info for everyone: http://bobsguides.com/modx.html [ed. note: BobRay last edited this post 11 years, 9 months ago.]
                    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
                    • 39717
                    • 14 Posts
                    Thanks BobRay.
                    Am neck deep in styling the articles now as i was getting so frustrated with that i had to leave it alone before i threw the comp out the window LOL.
                    Will look at your ideas and see if one of them works. I know it isn't the back button for certain, and i will check the rest and report back to you. (when i can face looking at it again)

                    thanks so much AGAIN!!!
                      • 39717
                      • 14 Posts
                      Hi again BobRay
                      Am now on my third install of this, completely fresh.
                      I followed the tutorial found here
                      http://rtfm.modx.com/display/ADDON/Login.Request+Membership
                      and
                      http://rtfm.modx.com/display/ADDON/Login.Basic+Setup
                      to the absolute letter, making sure all my resources were numbered exactly the same way.
                      Still i get a second and unwanted registration confirmation email and i am buggered if i can figure it out.




                        [li]The Register snippet's forwarding page is the page it's on or a non-existent page.
                        Request Membership (6)
                      [[!Register?
                          &submitVar=`registerbtn`
                          &activationResourceId=`8`
                          &activationEmailTpl=`ActivationEmailTpl`
                          &activationEmailSubject=`Thanks for Registering!`
                          &submittedResourceId=`7`
                          &usergroups=`Members`
                      ]]

                      where 8 = Membership Confirmation Handler
                      and 7 = Request pending
                      [/li]

                      [li]Two copies of the Register snippet on the same page (scroll all the way to the bottom)
                      double and triple checked

                      [/li]

                      [li]The Register snippet tag is on some page other than the Register page
                      The only single instance i can find the register snippet is on the request membership page[/li]

                      [li]You have the register and confirmRegister snippets on the same page (or one is in the page Template).
                      Have a link to register in a personalize chunk for members, but no snippet to register anywhere in template
                      [/li]


                      [li]The ConfirmResister page forwards the user to a page that contains the Register snippet.
                      Membership Confirmation Handler (8}
                      [[ConfirmRegister? &redirectTo=`9`]][/code
                        ] where 9 is my homepage[/li]


                      • The Thanks for Registering page has the Register snippet on it.
                      • At the moment dont have a thanks for registering.




                      • While testing you're hitting the "back" button on the Thanks for Registering page, and going back to the Register page.

                        Defintiely not this


                      ------------------------------------------------------------------------------------------
                      PLEASE, PLEASE specify the version of MODX you are using.
                      MODX info for everyone: http://bobsguides.com/modx.html




                      Completely stumped as to what might going on, three installs, three times the exact same results. on this third install, havent added anything but what was in the instructions in the referenced tutorial, following that 100% including making sure my resources were all numbered identically in case i was mismatching something in previous attempts. Thought it might have been a buggy install, but three times in a row makes that extremely unlikely.

                      thanks again

                      jacci

                      PS. i am not one of those people who are particularly averse to reading instructions, they are your friends and i read and re-read that tutorial and followed it precisely in every detail, and still problem persists argghhhh