We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39990
    • 45 Posts
    I have a few template variables that dynamically pull information for a couple templates on my site. I would like to give my user groups/users access to edit only one of them (a single-select field) because I don't what them to have access to change the others. However when a resource with this specific template is saved, it doesn't save the template variables that the user group doesn't have access. In fact it actually deletes the text inside one of the text field TV's that I am using so that it is blank.

    If I give a user group access to the template variable with a text field, it saves it like it should without any problems... but I really don't what to risk them changing that template variable since it completely controls the page layout. I have a test modx instillation that this works perfectly on, but I can't seem to find what is different. I have looked in the Form Customization, Access Policy, and the Template Variable it's self and haven't found anything that would make this not work... I have given my users access to save all template variables as well as basic save permissions. I have attached a couple screen shots of these two areas.

    Does anyone have any suggestions?

    Thank You!
      • 3749
      • 24,544 Posts
      I've seen this before. Make sure the TVs are actually attached to that Template. Also, check on the Access Permissions tab of the TV so see which Resource Groups it belongs to. If it belongs to a group that the user doesn't have 'save' permission on, it won't be saved.

      If that's not it, one possible solution is to give the users access to the TVs, but hide them with Form Customization.


      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html [ed. note: BobRay last edited this post 11 years, 7 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
        • 39990
        • 45 Posts
        Thank You for the reply! I have checked though all your suggestions including giving them full access to TV's and hiding them in the Form Customization, but it doesn't seem to have made a difference. The part that gets me is that as long as they have access to it, they can save it, but as soon as hide it from them when the resource is changed, the TV fields are updated so they are blank.

        Could the Context Access Tab under Access Controls > Update User Group have something to do with it? I have had issues with this in the past with these settings... Here is what I have...

        Context | Minimum Role| Access Policy
        1. mgr | Content Editor-10 | Context
        2. mgr | Content Editor-10 | Content Editor
        3. web | Member - 9999 | Context
          • 3749
          • 24,544 Posts
          Yes, the Content Editor Policy does not have the save_tv permission, so that could be it. There may also be some other permissions there you might need as well.


          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.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