We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49659
    • 86 Posts
    Greetings,

    I had installed ClassExtender earlier, and today needed to add a new extended field to the schema. So, I updated these files to include the new field:
    MyExtUserSchemaCustom
    MyExtraUserFieldsCustom
    


    I then viewed and submitted the 'Extend modUser' resource.

    ...with the following settings:
    [[!ClassExtender?
        &package=`extendeduser`
        &schemaTpl=`MyExtUserSchema`
        &class=`extUser`
        &parentObject=`modUser`
        &tablePrefix=`ext_`
        &tableName=`user_data`
        &dirPermission=`0755`
    ]]


    Unfortunately, I forgot to change the &schemaTpl to &schemaTpl=`MyExtUserSchemaCustom`, so it ran with the default values in &schemaTpl=`MyExtUserSchema`.

    I noticed the error, and submitted the 'Extend modUser' resource again with the correct &schemaTpl=`MyExtUserSchemaCustom`.

    Now, when I open a user in Manager, the fields defined in both 'MyExtraUserFields' and 'MyExtraUserFieldsCustom' appear. For example:

    First Name <-- from MyExtraUserFields
    Last Name <-- from MyExtraUserFields
    Title <-- from MyExtraUserFields
    First Name <-- from MyExtraUserFieldsCustom
    Last Name <-- from MyExtraUserFieldsCustom
    Other extended fields <-- from MyExtraUserFieldsCustom


    Where is it that both 'MyExtraUserFields..' templates are being loaded into the User form, so I can fix it?

    Thanks,

    Karl Forsyth

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

    • discuss.answer
      • 49659
      • 86 Posts
      I figured out what happened here.

      When I viewed and submitted the 'Extend modUser' resource twice, once with the incorrect value
      &schemaTpl=`MyExtUserSchema`

      and once with the correct value
      &schemaTpl=`MyExtUserSchemaCustom`

      it enabled both of these plugins: 'ExtraUserFields' and 'ExtraUserFieldsCustom'.

      I disabled the 'ExtraUserFields' plugin, and now, when I open a user in Manager, only the fields defined in 'MyExtraUserFieldsCustom' appear.
        • 3749
        • 24,544 Posts
        I'm glad you got it worked out. Thanks for reporting back. 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