We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40088
    • 708 Posts
    I'm using several extended fields as part of a member profile which are also shown on the front-end to (non-member) visitors. It works well (without classExtender).

    As an alternative I'm trying BobRay's classExtender. I followed the instructions and the installation/setup appears to have gone well, the custom fields were added to the Manager user profile page. But when I add a value to the field, either from Manager or on the front using the member's update profile page, the value is not being saved to the db.

    I've read through the classExtender docs but I've been unable to get it to work. Probably something simple I'm not seeing.

    This question has been answered by todd.b. See the first response.

    [ed. note: todd.b last edited this post 11 years, 3 months ago.]
      Todd
      • 3749
      • 24,544 Posts
      Is the ClassExtender ExtraUserFields plugin enabled?
        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
      • discuss.answer
        • 40088
        • 708 Posts
        Yes it is, Bob.

        It seems to be working now but I had to go through the entire process of deleting the table and regenerating it 3 times before the table showed the correct rows. It's as though the old schema was being cached and that was throwing everything off. But it's just a guess.

        Dumb question: Even when using classExtender are the fields/values still supposed to show in the Extended Fields tab of the user profile (Manager)?
          Todd
          • 3749
          • 24,544 Posts
          Not a dumb question at all: ClassExtender has nothing at all to do with the Extended Fields tab. If you created traditional extended fields earlier, they'll still be there until you remove them, though ClassExtender will ignore them completely.
            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
            • 40088
            • 708 Posts
            Quote from: BobRay at Jun 22, 2015, 09:57 PM
            If you created traditional extended fields earlier, they'll still be there until you remove them, though ClassExtender will ignore them completely.

            Hmmm. As a test I removed one of the previously created extended fields, yet despite that the same field exists in classExtender (and has a value) it keeps getting added back to the extended fields tab.

            Ideas? [ed. note: todd.b last edited this post 11 years, 3 months ago.]
              Todd
              • 3749
              • 24,544 Posts
              Are you showing the fields with getExtUsers or setUserPlaceholders?

              Are you running another snippet (e.g. Profile) in addition to that?
                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
                • 40088
                • 708 Posts
                I am also using Profile, Personalize, npEdit, SimpleSearch, taglister.

                As for classExtender I'm using setUserPlaceholders.
                  Todd
                  • 3749
                  • 24,544 Posts
                  Profile is likely setting the same placeholder. If it's below the setUserPlaceholders tag, it will overwrite any placeholders that exist as extended fields.

                  Try removing the Profile tag. You shouldn't need it, since setUserPlaceholders will set the Profile placeholders as well.

                  Try that first. If it works, I'd also recommend adding a prefix and using the &prefix property with setUserPlaceholders and adding that prefix to the placeholders to make sure there are no collisions with the other things you're running.
                    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
                    • 40088
                    • 708 Posts
                    Removing the [[!Profile]] call throws a "User not found" alert, as does using [[!setUserPlaceholders]] when viewed by non-members, aka the general public.
                      Todd
                      • 3749
                      • 24,544 Posts
                      What's your setUserPlaceholders Tag?
                        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