We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39587
    • 59 Posts
    Andy, yes the company field is updated from the backend user management form. Where do I find the modx error log
      • 38783
      • 571 Posts
      The MODX error log can be found via the Manager under Manage / Reports / Error log
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 39587
        • 59 Posts
        Found the error log and it is a 5mb file with 32,000 (most of them repetitive) entries what should I e looking for
          • 38783
          • 571 Posts
          I would clear the log, then use the registration form and look back at the log to see if anything new has appeared.
            If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

            email: [email protected] | website: https://andytough.com
            • 39587
            • 59 Posts
            After fixing all the error with obvious cause I am left with the following.

            /core/xpdo/xpdo.class.php : 948) xPDO->removeObject - Error deleting modDbRegisterMessage instance using query DELETE FROM `modx_register_messages` WHERE ( `modx_register_messages`.`topic` = 1 AND `modx_register_messages`.`id` = '45c48cce2e2d7fbdea1afc51c7c6ad26' )

            This not passing the data to the extended user table from the front end but data is passed from user manager.
              • 38783
              • 571 Posts
              I think the data is being added to the Extended Fields in MODX.

              Try adding this to the end of your snippet call:

              &useExtended=`0`
                If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                email: [email protected] | website: https://andytough.com
                • 38783
                • 571 Posts
                I think the data is being added to the User / Extended Fields in MODX.

                Try adding this to the end of your snippet call:

                &useExtended=`0`
                  If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                  email: [email protected] | website: https://andytough.com
                  • 39587
                  • 59 Posts
                  After adding &useExtended=`0` I get the following errors

                  /core/xpdo/xpdo.class.php : 1320) Could not get table class for class: modAccess
                  /core/xpdo/xpdo.class.php : 1289) Could not get table name for class: modAccess
                  core/xpdo/om/xpdoobject.class.php : 240) Error 42000 executing statement: 
                  Array
                  (
                      [0] => 42000
                      [1] => 1064
                      [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS `modAccess` WHERE `modAccess`.`principal` = 20' at line 1
                  )


                  Still not passing data to the extended table. Company information that I entered earlier did go to the Extended field.
                    • 38783
                    • 571 Posts
                    Could you post the entry for you new field 'company' in both your MyExtraUserFields and MyExtUserSchema chunks?

                    Could you also try, just as a test, to simplify your call by removing the part that puts the user into a specific group: &usergroups=`suppliers`

                    Also, thinking about the order of things, could you try putting these two parts in this order, if they aren't already:
                        &useExtended=`0` 
                        &postHooks=`ExtUserRegisterPosthook` 
                    


                    You may also find some information in this thread: https://forums.modx.com/thread/?thread=96989 [ed. note: andytough last edited this post 8 years, 6 months ago.]
                      If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                      email: [email protected] | website: https://andytough.com
                      • 39587
                      • 59 Posts
                      MyExtraUserFields

                      <div class="x-form-item x-tab-item">
                              <input type="text" name="company" value="[[+company]]" class="x-form-text x-form-field"
                                      onClick="Ext.getCmp('modx-panel-user').markDirty();"/>
                          </div>


                      MyExtUserSchema

                      <?xml version="1.0" encoding="UTF-8"?>
                      <model package="extendeduser" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" tablePrefix="ext_" version="1.0.0">
                          <!-- extend the modUser class -->
                          <object class="extUser" extends="modUser">
                              <composite alias="Data" local="id" class="userData" foreign="userdata_id" cardinality="one" owner="local"/>
                          </object>
                          <object class="userData" table="user_data" extends="xPDOSimpleObject">
                              <field key="userdata_id" dbtype="int" precision="11" phptype="integer" null="false" attributes="unsigned"/>
                              
                              <field key="company" dbtype="varchar" precision="100" phptype="string" null="true"/>
                              <field key="registrationDate" dbtype="datetime" phptype="datetime"/>
                      	<index alias="userdata_id" name="userdata_id" primary="false" unique="true" type="BTREE">
                              <column key="userdata_id" length="" collation="A" null="false"/>
                              </index>
                              <aggregate alias="User" class= "modUser" local="userdata_id" foreign="id" cardinality="one" owner="foreign"/>
                              <aggregate alias="Profile" class="modUserProfile" local="userdata_id" foreign="internalKey" cardinality="one" owner="foreign"/>
                          </object>
                      </model>