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

    I've set up a user group with a specific filemanager_path so they don't 'mess' with the main tree root. All works fine, but I have a problem with image paths. When editors insert images via a document variable, the full path doesn't get stored, but only the bit that they can 'see'. This means I am having trouble with different users with different roots inserting images, as I don't know which bits from the path are missing in order to add via code. An example:
    image is in
    /files/assets/content/images/image1.jpg

    user a inserts an image in a TV and the path is 'assets/content/images/image1.jpg', because this user has access to the root of the files treed

    another user inserts the same image but because he has access to a lower level, his 'top node' is 'content', the path inserted is 'images/image1.jpg'

    For 1 group and variation of paths, it's OK, I could check in php what the path looks like and adjust accordingly. However, over a large group of users with different access, this becomes unmanageable.

    Question is: have I done anything wrong, is there anything I can do to write the 'full' path into the TV, regardless of user access?

    Thanks
      • 37758
      • 73 Posts
      OK, I've found the solution, albeit by chance - I also needed to set the filemanager_url in the system settings to the same path as my custom path. This has screwed it up for the admin who has access the full path, incl the root, but at least it works for 'normal' editors