We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23299
    • 1,161 Posts
    Bob, I tried adding that CheckStaus snippet but I get a 500 server error? I am not sure if I need to add this or not though...
      • 3749
      • 24,544 Posts
      I guess it doesn't like you setting the HTTP_REFERER. Just remove that line. It should be unnecessary in normal operation. I just put it in in case you were testing by typing the address into the browser. As long as the user gets there via a link, it should be fine.

        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
        • 23299
        • 1,161 Posts
        Thanks Bob.

        I am making good progress with all this functionality. Its a little different than what I had first envisioned but it looks like it will all work pretty well. I really appreciate your input.

        Couple of things:

        1) Is there a way to add custom fields in the Manage Users > General Information pane that will then get displayed by the Peoples snippet?

        2) I am using the UpdateProfile snippet. I have dropped a few items from the default form and it works fine. Once a user has logged in he can update the info fields in the form. One problem though: when the user clicks the Update Profile button nothing is changed when the user then goes to the actual profile landing page? I have discovered that the changes will only show when you clear the cache from the MODx manager? Refreshing the browser does not do the trick...
          • 3749
          • 24,544 Posts
          1. I think what you want are user "extended fields". They're a little tricky to get the hang of at first, but they let you add fields to the profile. Look for the Extended Fields tab when updating user info in the Manager. The last time I checked, you had to repeat the process of adding an extended field for each user.

          You'll have to tell Peoples (and maybe Profile/UpdateProfile) that you want to include extended fields.


          2. Are you calling the Profile snippet uncached?

          [[!Profile]]


          You may also have to make the placeholders uncached.

          [[!+placeholderName]]

            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
            • 23299
            • 1,161 Posts
            I think I only have to use the UpdateProfile snippet on this page and not the actual Profile snippet?

            This is the code I have on the Update Profile page:

            [[!UpdateProfile]]
            <div class="update-profile">
                <div class="updprof-error">[[+error.message]]</div>
                [[+login.update_success:if=`[[+login.update_success]]`:is=`1`:then=`[[%login.profile_updated? &namespace=`login` &topic=`updateprofile`]]`]]
             
                <form class="form" action="[[~[[*id]]]]" method="post">
                    <input type="hidden" name="nospam:blank" value="" />
             
                    <label for="fullname">[[!%login.fullname? &namespace=`login` &topic=`updateprofile`]]
                        <span class="error">[[+error.fullname]]</span>
                    </label>
                    <input type="text" name="fullname" id="fullname" value="[[+fullname]]" />
            
             
                    <label for="email">[[!%login.email]]
                        <span class="error">[[+error.email]]</span>
                    </label>
                    <input type="text" name="email:required:email" id="email" value="[[+email]]" />
            
            
             
                    <label for="phone">[[!%login.phone]]
                        <span class="error">[[+error.phone]]</span>
                    </label>
                    <input type="text" name="phone" id="phone" value="[[+phone]]" />
             
                    <label for="mobilephone">[[!%login.mobilephone]]
                        <span class="error">[[+error.mobilephone]]</span>
                    </label>
                    <input type="text" name="mobilephone" id="mobilephone" value="[[+mobilephone]]" />
            
            
             
             
                    <label for="address">[[!%login.address]]
                        <span class="error">[[+error.address]]</span>
                    </label>
                    <input type="text" name="address" id="address" value="[[+address]]" />
             
                    <label for="country">[[!%login.country]]
                        <span class="error">[[+error.country]]</span>
                    </label>
                    <input type="text" name="country" id="country" value="[[+country]]" />
             
                    <label for="city">[[!%login.city]]
                        <span class="error">[[+error.city]]</span>
                    </label>
                    <input type="text" name="city" id="city" value="[[!+city]]" />
             
                    <label for="state">[[!%login.state]]
                        <span class="error">[[+error.state]]</span>
                    </label>
                    <input type="text" name="state" id="state" value="[[+state]]" />
             
                    <label for="zip">[[!%login.zip]]
                        <span class="error">[[+error.zip]]</span>
                    </label>
                    <input type="text" name="zip" id="zip" value="[[+zip]]" />
            
            
             
                    <label for="website">[[!%login.website]]
                        <span class="error">[[+error.website]]</span>
                    </label>
                    <input type="text" name="website" id="website" value="[[+website]]" />
            
             
                    <br class="clear" />
             
                    <div class="form-buttons">
                        <input type="submit" name="login-updprof-btn" value="[[!%login.update_profile]]" />
                    </div>
                </form>
            </div>


            As you can see I have the
            [[!UpdateProfile]]
            set to uncached. I also set the City section to uncached as a test as well:
            <label for="city">[[!%login.city]]
                        <span class="error">[[+error.city]]</span>
                    </label>
                    <input type="text" name="city" id="city" value="[[!+city]]" />


            The main landing page for the profile is still not updating after sending the UpdateProfile form though. It will only reflect the updates when you clear the cache via the MODx Manager...
              • 3749
              • 24,544 Posts
              It's the cache settings on the landing page that matter. How are those set? Try unchecking the 'cacheable' checkbox for that page in the Manager (and the clearing the cache).
                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
                • 23299
                • 1,161 Posts
                Bingo!!! That worked!

                Thanks Bob! You really are one of the mainstays with this entire MODx enterprise...
                  • 3749
                  • 24,544 Posts
                  Thank you. I'm glad it worked.

                  I'm sensing that you might have some confusion about how the cache works. I hope you won't mind a bit of explanation.

                  When a tag or a page is uncached, it tells MODX, "get me a fresh version of this -- don't get it from the cache." So, basically, anything that will change with subsequent views of the page should be uncached. The only things that should be cached are things that only change when you edit something in the Manager.

                  Wayfinder tags, for example, can usually be cached because the menu only changes when you work in the Manager. The exception would be if you have a snippet that shows a different menu depending on which user is visiting or some other condition (e.g. a day menu and a night menu).

                  Most pages can be cached as long as any tags in them that show dynamic content that might change based on current conditions are uncached.

                  I hope that makes sense. smiley
                    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