We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    ClassExtender is designed to make it easy to extend the modUser and modResource objects in MODX. It will not only extend the objects for you, it also gives you tools update them in the database, and search for your extended objects and display them.

    Plugins are provided that, with modification, will display your extra fields on the Create/Edit User and Resource pages and will save the data to your custom table when those forms are submitted.

    Support for the development of ClassExtender was provided, in part, by Kindem Design http://www.kindemdesign.com/.

    http://bobsguides.com/classextender-class.html
      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
      • 38878
      • 255 Posts
      Hey Bob,

      Im having an issue in my error log with ClassExtender. Im runnin 2.3 dev in a dev cloud. The error that repeats in the log every page load is:

      [2014-06-29 20:36:43] (ERROR @ /connectors/index.php) Path specified for package extendeduser is not a valid or accessible directory: /paas/c1292/www/core/components/classextender/model/model/

      I looked at the extensiions settions in the system setting and the look correct. I disabled the plugin thinking that would stop the error but to no avail. I also reinstalled and still Im getting the error. Any ideas?

      Thanks!
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Somebody's got a redundant "model" in a path somewhere.
          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
          • 3749
          • 24,544 Posts
          I haven't had a chance to run it in 2.3. I'm pretty sure that message is caused by the path in the extension_packages System Setting. It loads the class from that path on every request (even Manager requests). Take another look at the setting to see if 'model/model/' is part of it (not likely). If so, delete the one 'model/'.

          The only thing I can think of is that maybe 'model/' is added automatically to that path in 2.3. You might try changing that setting. Change the last part from

          components/classextender/model/

          to

          components/classextender/

          You might want to paste the original value somewhere so you can change it back if that doesn't work.
            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
            • 38878
            • 255 Posts
            Hey Bob, tried the below but it appears to have broken the manager login. Once I changed this setting I was immediately booted to the login screen but auth fails. With no way back into the manager to revert the system setting, I'm forced to edit the DB and putting the system setting back to original. Unfortunately my phpmyadmin on the cloud is broken atm.

            Short story is I don't recommend this for others seeing this error. I will update once I get my phpmyadmin fixed.

            Quote from: BobRay at Jun 29, 2014, 10:01 PM
            I haven't had a chance to run it in 2.3. I'm pretty sure that message is caused by the path in the extension_packages System Setting. It loads the class from that path on every request (even Manager requests). Take another look at the setting to see if 'model/model/' is part of it (not likely). If so, delete the one 'model/'.

            The only thing I can think of is that maybe 'model/' is added automatically to that path in 2.3. You might try changing that setting. Change the last part from

            components/classextender/model/

            to

            components/classextender/

            You might want to paste the original value somewhere so you can change it back if that doesn't work.
              • 3749
              • 24,544 Posts
              Sorry about the trouble. It really shouldn't cause that unless some other characters were deleted and it's now invalid JavaScript.

              Even then, I'm surprised that it affects Login that way.
                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
                • 38878
                • 255 Posts
                No biggie! As I said, resolved the login issue by resetting the system setting to the original value in the database. Then I could login. I can live with the annoying error log messages until you get to the bottom of it wink Appreciate the addon btw.

                Quote from: BobRay at Jun 30, 2014, 12:39 PM
                Sorry about the trouble. It really shouldn't cause that unless some other characters were deleted and it's now invalid JavaScript.

                Even then, I'm surprised that it affects Login that way.
                  • 3749
                  • 24,544 Posts
                  Just a thought -- have you tried deleting all files in the core/cache directory? Sometimes MODX has settings in the cache that are not cleared when you do it in the Manager.

                  [Update]
                  I'm afraid I was unable to duplicate the problem. I installed ClassExtender in MODX 2.3, extended modUser, updated all users, edited a user (including the extra fields), and logged in and out several times. Everything worked perfectly. [ed. note: BobRay last edited this post 12 years, 3 months 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
                    • 38878
                    • 255 Posts
                    Oh yes. Many times. I tried reinstall and uninstall and the error is persistent. Is there anything left over that you know of that I should manually remove after uninstall to make sure I'm clean?

                    Quote from: BobRay at Jul 01, 2014, 06:42 PM
                    Just a thought -- have you tried deleting all files in the core/cache directory? Sometimes MODX has settings in the cache that are not cleared when you do it in the Manager.

                    [Update]
                    I'm afraid I was unable to duplicate the problem. I installed ClassExtender in MODX 2.3, extended modUser, updated all users, edited a user (including the extra fields), and logged in and out several times. Everything worked perfectly.
                      • 3749
                      • 24,544 Posts
                      I don't think so. Every time I've tested the uninstall, it has removed everything.

                      I'm thinking there must be something unusual about your site, but I can't think what it might be.

                      I think the error is occurring in the request handling process and it's happening before any part of ClassExtender is even loaded. So the only role ClassExtender has in this case is writing the value of the extension_packages System Setting, which appears to be correct.

                      When the browser requests a page, MODX checks the value of extension_packages and tries to load any packages referenced there. This happens before the page is actually loaded or parsed. I'm pretty sure that's what's failing in your case, and I think the error message is coming from the code that loads stuff specified in extension_packages. IIRC, you said that disabling the CE plugin didn't stop the error, which would be consistent with what I think is happening.

                      Even if that's not the case, I think the error would be triggered by the ClassExtender plugin attempting to use the class, which would only fail because it wasn't loaded properly earlier.

                      [ed. note: BobRay last edited this post 12 years, 2 months 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