We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Just installed Discuss/Login/Formit. Everything is set up, but the login fields at the right top are missing.

    Maybe it has to do with the following: I checked if the registration page exists, which it does. But registering does not work: nothing happens when submitting the form.

    I checked everything again and again, but I can't find what's wrong.
      • 36613
      • 328 Posts
      Can you past the register and HTML code ?
      • Register code:
        <h2>Register</h2>
         
        [[!Register?
            &submitVar=`registerbtn`
            &activationResourceId=`91`
            &activationEmailTpl=`myActivationEmailTpl`
            &activationEmailSubject=`Thanks for Registering!`
            &submittedResourceId=`89`
            &usergroups=`Marketing,Research`
            &validate=`nospam:blank,
          username:required:minLength=^6^,
          password:required:minLength=^6^,
          password_confirm:password_confirm=^password^,
          fullname:required,
          email:required:email`
            &placeholderPrefix=`reg.`
        ]]
         
        <div class="register">
            <div class="registerMessage">[[!+reg.error.message]]</div>
         
            <form class="form" action="[[~[[*id]]]]" method="post">
                <input type="hidden" name="nospam" value="[[!+reg.nospam]]" />
         
                <label for="username">[[%register.username? &namespace=`login` &topic=`register`]]
                    <span class="error">[[!+reg.error.username]]</span>
                </label>
                <input type="text" name="username" id="username" value="[[!+reg.username]]" />
         
                <label for="password">[[%register.password]]
                    <span class="error">[[!+reg.error.password]]</span>
                </label>
                <input type="password" name="password" id="password" value="[[!+reg.password]]" />
         
                <label for="password_confirm">[[%register.password_confirm]]
                    <span class="error">[[!+reg.error.password_confirm]]</span>
                </label>
                <input type="password" name="password_confirm" id="password_confirm" value="[[!+reg.password_confirm]]" />
         
                <label for="fullname">[[%register.fullname]]
                    <span class="error">[[!+reg.error.fullname]]</span>
                </label>
                <input type="text" name="fullname" id="fullname" value="[[!+reg.fullname]]" />
         
                <label for="email">[[%register.email]]
                    <span class="error">[[!+reg.error.email]]</span>
                </label>
                <input type="text" name="email" id="email" value="[[!+reg.email]]" />
         
                <br class="clear" />
         
                <div class="form-buttons">
                    <input type="submit" name="registerbtn" value="Register" />
                </div>
            </form>
        </div>
        [ed. note: handjes last edited this post 8 years, 1 month ago.]
        • html code:
          <h2>Register</h2>
          <div class="register">
          <div class="registerMessage"></div>
          <form class="form" action="register.html" method="post"><input type="hidden" name="nospam" value="" /> <label for="username">Gebruikersnaam <span class="error"></span> </label> <input id="username" type="text" name="username" value="" /> <label for="password">Wachtwoord <span class="error"></span> </label> <input id="password" type="password" name="password" value="" /> <label for="password_confirm">Bevestig wachtwoord <span class="error"></span> </label> <input id="password_confirm" type="password" name="password_confirm" value="" /> <label for="fullname">Volledige naam <span class="error"></span> </label> <input id="fullname" type="text" name="fullname" value="" /> <label for="email">E-mail <span class="error"></span> </label> <input id="email" type="text" name="email" value="" /> <br class="clear" />
          <div class="form-buttons"><input type="submit" name="registerbtn" value="Register" /></div>
          </form></div>
          </div>
            • 46886
            • 1,154 Posts
            The login fields simply do not appear at all? Pls state the situation clearly as you say later 'when submitting the form', so are the fields there or no?

            Make sure you have all the right resource ids in system settings>discuss>SSO settings

            Here is what I have in wrapper.tpl, I have fiddled with it a bit though.

                                [[+discuss.user.id:is=``:then=`
                                <div class="masthead-login m-login_box h-group" style="margin-top:5px; margin-left:25%;">
                                    <div class="masthead-title">Login below or <a href="[[~[[++discuss.register_resource_id]]]]">create an account!</a></div>
                                        <form class="m-login_block" method="post" action="[[~[[++discuss.login_resource_id]]]]">
                                            <input type="hidden" name="service" value="login" />
                                            <input type="hidden" name="discussPlace" value="[[+discuss.place]]" />
                                            <div class="f9-f12">
                   <p style="white-space: nowrap;">
                                                    <input type="text" name="username" id="login-username">
                                                    <label class="loginUsernameLabel">Username</label><label class="loginPasswordLabel">/ Password</label>
            
                                            <br />
            
                                                    <input type="password" name="password" id="login-password">
                            
                                                </p>
                                   <p style="white-space: nowrap;"><input class="alt-1-cta" type="submit" value="Login">  <a href="[[~11]]">Reset Password</a></p>
                                            </div>


            So the register resource id and login resource id are both gotten from system settings, and there is a bug where reset password did not do that properly, so i hard-coded it in there href="[[~11]]"

            It doesn't seem like there is much there, so I would assume your system settings are not right? You could try hard-coding them in there to check.
              • 46886
              • 1,154 Posts
              Ok I see your code, this isn't within Discuss at all I suppose?

              First off I see you need to remove the <p> before the snippet. You should turn off rich text in the resource. That opening and closing <p> will mess up your snippet.

              And do you have the snippet and html together? They should go together, I suppose you do.
              • Quote from: nuan88 at Mar 15, 2016, 03:28 PM
                The login fields simply do not appear at all? Pls state the situation clearly as you say later 'when submitting the form', so are the fields there or no?

                Make sure you have all the right resource ids in system settings>discuss>SSO settings

                (I edited the codes above: deleted the <p>'s).

                Settings are fine. I followed the instructions exactly.

                There is no login field at the right top of the forum pages. The green login button also doesn't work: nothing happens when clicked on.

                There is a registration page (with fields), but nothing happens after submitting that form, except for the 'thank you' page. The user does not get the activation mail. And they still cannot login since there is no login field. I can see the user in the Manager, but not activated. [ed. note: handjes last edited this post 8 years, 1 month ago.]
                  • 46886
                  • 1,154 Posts
                  Ok let's try to sort this.

                  Looks like register is working as the user is being created. The email issue is a separate issue, but there is a value in system settings, I use my email on my company domain and that works, the Registration Email From Address value.

                  I think the key to getting you working is to make sure first of all the register can work at all, then making it work with discuss.

                  Ok, for the login box, here is how it works: Its a code that basically says, If there is a current user then give them the user info like new PMs, replies and so on, if no current users it shows the login box. That's the code I pasted in my first reply here.

                  Now, you are showing us the register snippet, which you need, but that snippet doesn't usually go into this space. Rather, we just have login text boxes, with links to register and forgot password. The register is a full page, so it can't fit in this space.

                  First off, what theme are you using and have you edited it at all? I would suggest you could use the default theme and then customize it. The "Modx" theme is very similar and could be fine too, I just know less about it.

                  In your theme, the main forum page is created by the file wrapper.tpl. You can view it at core>component>discuss>theme>page>wrapper.tpl.

                  Now if the login isn't showing up, first step is make sure login resource is working. Let's do that first. We know that register is working even if the email has a problem.

                  First make sure login resource is ok and also published (super important that its published), with rich text turned off (and/or the text editor turned off) to mess with us.

                  <div>[[!Login? &preHooks=`preHook.DiscussLogin` &loginResourceId=`20` &postHooks=`postHook.DiscussLogin`]]</div>


                  The loginResourceId is my (published) Discuss resource. I deleted a value for the login tpl, but it should use the default tpl.

                  Ok hope this focuses us properly, I think this is the way to move forward.
                  • To be honest here, I wouldn't be using Discuss at all. While it would be very nice to have a fully-integrated forum add-on for MODX, I don't see Discuss being that useful for the purpose. Too many problems.

                    I would use SMF and and https://github.com/bezumkin/MODX-SMF for user integration and SSO.
                      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
                      • 46886
                      • 1,154 Posts
                      Well, this is a Login issue, not a Discuss issue. This aspect of Discuss will work fine if all the resources are in place and system settings properly configured.

                      But yeah, you are right, Discuss is reaching the end of its life-cycle without a doubt. I am hoping to build some support for Discuss2, which has been released to the community and was built just about a year ago (maybe 2) by Petri, and my info is that its quite close to production-quality or near enough that with some support and testing the community could use it. I would love to help document that system, it looks really cool. Maybe over the summer I will ask my dev to try and get it set up on my server.

                      I don't think SMF is really a replacement for Discuss to be honest, Vanilla too. Discuss gives users real control over their forum style, even with the limitations of the theme. SMF looks very basic (can't open github because I am in China, can't wait to get out of this backward country) from what I can see. Vanilla requires you to be a serious coder (and dig deeply into the Smarty library, which one dev told me is just terrible) just to do the simplest stuff, and in the forums they are nice but its clear they are not encouraging DIY people. Vanilla is like the wordpress of forums, easy to get started but seriously limited in the control you have.

                      That's why I think Discuss2 could do very well, the options that I have seen are all lacking in one way or another. Many people want control of their systems and most options are unable to provide that.