We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49659
    • 86 Posts
    I've installed classextender-2.0.0-pl to MODX Revolution (2.3.3), in order to add some custom fields to the User profile records.

    I added some new custom fields to these Chunks:

    MyExtUserSchema
    MyExtraUserFields
    lgnProfileUpdateForm
    lgnProfileViewForm

    Now, the new custom fields appear in the User record (mgr context), AND in the Profile view and Update forms (web context).

    Also, I can update the custom fields in the Profile update form (web context), and the changes appear in the User record (mgr context).

    However, the changes I make to the custom fields in the User record (mgr context) are saved and reflected ONLY in the User record (mgr context). The changes made in Manager don't appear in the Profile view and Update forms (web context).

    I'm new to MODX, and need some guidance troubleshooting this. Any ideas what might be wrong, or where to look?

    Thanks in advance.

    This question has been answered by kjforsyth. See the first response.

      • 3749
      • 24,544 Posts
      It sounds like a cache issue. If you clear the site cache in the Manager after updating the fields, do they appear correctly in the web Context? If not, try manually deleting the files in the core/cache directory after saving the user (just for diagnostic purposes).

      In theory, the user cache is refreshed when you save a user, but that may happen before the extra fields are saved.
        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
        • 49659
        • 86 Posts
        Quote from: BobRay at Apr 14, 2015, 07:53 PM
        It sounds like a cache issue. If you clear the site cache in the Manager after updating the fields, do they appear correctly in the web Context? If not, try manually deleting the files in the core/cache directory after saving the user (just for diagnostic purposes).

        In theory, the user cache is refreshed when you save a user, but that may happen before the extra fields are saved.

        Thanks for the quick reply! I just realized that I can update the core fields (Fullname, email, etc.) from Manager and the changes appear in the Profile and Update forms (web context). It's just the new custom fields that I can't update from the Manager. And ALL user fields (core and custom) can be updated from the web.
          • 3749
          • 24,544 Posts
          Did you try the things I suggested to diagnose the problem?

          Also, when you update the custom fields in the Manager, do they change in the MODX database
          (views in PhpMyAdmin from cPanel)? [ed. note: BobRay last edited this post 9 years 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
            • 49659
            • 86 Posts
            Quote from: BobRay at Apr 14, 2015, 09:30 PM
            Did you try the things I suggested to diagnose the problem?

            Sorry, I forgot to mention that. Yes, I did clear the site cache in the Manager after updating the custom fields - no update reflected in the web context.

            Re: deleting the files in the core/cache directory after saving the user - There are several folders under core/cache: action_map, auto_publish, context_settings, ..., system_settings. Delete ALL folders and files under core/cache?
              • 49659
              • 86 Posts
              Quote from: BobRay at Apr 14, 2015, 09:30 PM
              Did you try the things I suggested to diagnose the problem?

              Also, when you update the custom fields in the Manager, do they change in the MODX database
              (views in PhpMyAdmin from cPanel)?

              I just went in to PhpMyAdmin from cPanel and viewed the data via:

              SELECT * FROM `ext_user_data`

              Yes, the custom fields are being updated there from the Manager. The changes just aren't being read in the web context
                • 3749
                • 24,544 Posts
                Yes, but are they read correctly if you clear the site cache in the Manager or manually delete the cache files? Knowing which of those is true will help me fix the problem.
                  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
                  • 49659
                  • 86 Posts
                  Here's what we know for sure:

                  1) We've verified (via PhpMyAdmin) that the custom field data IS being reliably updated from Manager;

                  2) We've verified (via PhpMyAdmin) that the custom field data IS being reliably updated from the web context;

                  3) Custom field data updated from the Manager is not reflected in the web context;

                  4) Custom field data updated from the web context IS reflected in the Manager;

                  5) Clearing the site cache in the Manager after updating the custom fields from the Manager does not fix the problem of the web context not refreshing with updated data.

                  So, manually deleting the cache files might do it. Please clarify for me: There are several folders under core/cache: action_map, auto_publish, context_settings, ...

                  Should I delete ALL folders and files under core/cache, or just a particular sub-folder?

                  Thanks!
                    • 3749
                    • 24,544 Posts
                    I'm not sure what folder it would be in. Deleting all files in the core/cache dir. will make sure to get it.
                      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
                      • 49659
                      • 86 Posts
                      OK, I closed Manager, deleted all folders and files in the core/cache dir via FTP, and then restarted Manager. I changed one of the custom fields in the user record, saved, closed, cleared the cache [Manage-Clear Cache], and the change is still not appearing in the web context.