We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10405
    • 288 Posts
    Hi, I've installed the latest version of Discuss on Revo 2.4.2 and trying to follow the official setup process as per the Discuss Installation page, but for some reason the Update Profile page (which is supposed to be accessible from the My Profile link for the logged in user inside Discuss) doesn't work / display. I created the resource and placed this in the content:

    [[!UpdateProfile? &postHooks=`postHook.DiscussUpdateProfile`]] [[!DiscussUpdateProfileLoader]]
    


    I also edited the Discuss system setting for the correct Update profile resource ID to point to, logged out of the forum, cleared the cache several times. If I log back in and go to the dropdown for the user, and select My Profile, it goes to the default site page (presumably because it can't find the Update profile page). I can only see it if I choose View from inside the Manager interface. I also tried putting the page inside the Forums container as well as in the site root. Anyone have any ideas?
      • 46886
      • 1,154 Posts
      Hi I use discuss, let me see if I can get you set right. Also if you are having other problems pls let me know.

      If its not opening the page and going instead to the main or default page, that's going to mean its an error. Could it be an unpublished resource?

      If the page doesn't even load, that doesn't sound like a bad snippet, which it seems to me would either really zero out the site and return an error, or would load but...the snippet itself wouldn't work or appear.

      However, now that I think about it, with this stuff we are better starting with the standard snippet, then we can work with that to find out what is breaking things. So, I notice that while I assume your <<DiscussUpdateProfileLoader>> code is standard, your snippet is looking a little oversimplified. Also the problem could be the form which follows this, are you using the standard one?

      My update profile is a bit of a mess of code, but here are the relevant bits:

      [[!UpdateProfile?
      &postHooks=`postHook.DiscussUpdateProfile`
      &preHooks=`avatarUpload`
      &useExtended=`1`
      &excludeExtended=`email:required:email,display_name,show_email,show_online,Profile_Photos,use_display_name,signature,signature:allowTags,login-updprof-btn`
      &validate=`nospam:blank,`']]
      [[!DiscussUpdateProfileLoader]]

      <h1>Update Profile</h1>
      ...
      [[+login.update_success:is=`1`:then=`[[%login.profile_updated? &namespace=`login` &topic=`updateprofile`]]`]]

      <form class="form" enctype="multipart/form-data" action="[[~[[*id]]]]" method="post">
      ...
      <div class="form-buttons">
      <input type="submit" name="login-updprof-btn" value="Save" />
      </div>
      </form>
      </div>

      Some of the useExtended, excludeExtended, validate terms might be needed. Also does your form have the other bits?

      Finally, I just checked and the url of the update profile is https://www.rayxilawforums.com/updateprofile.html?discuss=1, are you getting the same url?

      Give a bit more info and I think we can work it out.
        • 46886
        • 1,154 Posts
        Looks like also you are missing a character at the end of the snippet call, a single quote after the last variable:

        [[!UpdateProfile? &postHooks=`postHook.DiscussUpdateProfile`']] [[!DiscussUpdateProfileLoader]]


        That might be the place to start wink
          • 10405
          • 288 Posts
          Hi, well I added the single quote at the end of the UpdateProfile snippet but that didn't do anything- not sure why there would need to be a single quote there? What does it do?

          I tried your version of the UpdateProfile code but sadly no joy there either.

          The only other code (and only other content) in the page is the recommended form output for users to change their details:

          <label for="signature">Signature <span class="error">[[!+up.error.signature:stripTags=`p,b,strong,i,a,ul,li`]]</span></label>
          <textarea name="signature:allowTags" id="signature">[[!+up.signature]]</textarea>
           
          <label for="use_display_name">Use Display Name in Forums <span class="error">[[!+up.error.use_display_name]]</span></label>
          <input type="hidden" name="use_display_name" id="use_display_name_hidden" value="0" />
          <input type="checkbox" name="use_display_name" id="use_display_name" value="1" [[!+up.use_display_name:FormItIsChecked=`1`]] />
           
          <label for="display_name">Display Name <span class="error">[[!+up.error.display_name]]</span></label>
          <input type="text" name="display_name" id="display_name" value="[[+up.display_name]]" />
           
          <label for="show_online">Show Online Status <span class="error">[[!+up.error.show_online]]</span> </label>
          <input type="hidden" name="show_online" id="show_online_hidden" value="0" />
          <input type="checkbox" name="show_online" id="show_online" value="1" [[!+up.show_online:FormItIsChecked=`1`]] />
           
          <label for="show_email">Show Email in Forums <span class="error">[[!+up.error.show_email]]</span></label>
          <input type="hidden" name="show_email" id="show_email_hidden" value="0" />
          <input type="checkbox" name="show_email" id="show_email" value="1" [[!+up.show_email:FormItIsChecked=`1`]] />
          


          I've named the resource "update-profile", should it have some other name? I also tried setting it to one of my existing templates, and to no template (like Discuss) but still no joy.
            • 46886
            • 1,154 Posts
            It could well be the resource name, pls re-name it as UpdateProfile, what url are you getting?

            I think you *could* have a different name for this resource, but then you would need to go into some files and make changes.
              • 46886
              • 1,154 Posts
              Well I checked the standard snippet, and no single quote at the end, so I don't know what is up with that. I do not know what it does i must admit.

              But the snippet itself doesn't seem to be the problem here as I mentioned before. If the snippet is broken, you still should get the page loaded. If the snippet throws an error, then you will know it. So the fact of no page load indicates to me at least that the snippet is not the culprit.

              I also looked into one of the update profile snippets (the login one, not the discuss one) and it does use code like "UpdateProfile", and I think that's why the resource name matters.

              Let me know if this works or not. It seems silly, and the setup instructions don't mention that the resource name is important, but...well its easy enough to check.
                • 10405
                • 288 Posts
                Well, I'm not getting anywhere with this problem- surely some other people must have encountered the problem with the Edit link not working for the user profile inside Discuss?

                The Update Profile page contains the following snippet which looks ok to me?
                [[!UpdateProfile? &postHooks=`postHook.DiscussUpdateProfile`']] [[!DiscussUpdateProfileLoader]]
                


                So I don't see why it isn't working?
                The Edit link inside Discuss points here for some reason:
                http://mydomain.com/forums/user/edit
                


                But the URL for my Update Profile page is update-profile.html- should it be something else? The Edit button seems to find it ok, but it's blank...
                  • 46886
                  • 1,154 Posts
                  Are you still getting the page not loading, like before? If the behavior is different pls update on that.

                  I will go through this carefully tomorrow (its late here) but did you follow this suggestion:

                  It could well be the resource name, pls re-name it as UpdateProfile

                  Pls try that, precisely UpdateProfile, no dashes or anything else. I looked at the snippets and they use this specific term, it might matter.

                  The url will follow whatever the resource name is, but the snippet could require the name to be right. Again, its not really the snippet (probably) when the page will not resolve, snippets either will do nothing or will throw an error.

                  Pls confirm this issue, then we can move on. I have never seen this type of behavior before.
                    • 46886
                    • 1,154 Posts
                    Also make sure in system settings for Discuss, Update Profile Resource ID is set properly...not sure if we talked about that before or not.

                    In my Discuss, the edit link is the same as yours,

                    http://mydomain.com/forums/user/edit


                    So I don't think that's the problem.

                    Here is a pic just to be clear. These are the most important settings to get Discuss working. Make sure they all line up. [ed. note: nuan88 last edited this post 10 years, 7 months ago.]
                      • 10405
                      • 288 Posts
                      Thanks, yes all my settings point to the correct resource IDs on the site so i have no idea what's going on with this.

                      Obviously I can't put this live until this issue is sorted (as users can't update their own profiles!) so if anyone has any ideas... thanks...