I'm using 2.2.0-rc1 on a couple dev sites, and I really like it. One thing I noticed that changed was with Image TVs, you can no longer set the Base Dir -- is the preferred method now to set up a separate Media Source for this? That seems overly complicated. Am I missing something? It is really handy to be able to specify where a given Image TV gets its goods.
I followed the instructions to the letter in the rtfm, and now my Adminstrator user can't see the Media Source I just created! It's there, since trying to re-create it throws the error that it already exists. And assigning it to a TV causes the TV's input field to disappear altogether. The problem may be that in the Media Sources tab for the TV there's only one context, web. According to rtfm, I should see both web and mgr contexts there.
[ed. note: sottwell last edited this post 12 years, 4 months ago.]
Are you using 2.2.0-rc1 presumably? Have you made any modifications to the permissions (e.g. roles, policies, etc.)? I was playing around with that and hosed my site as well... I had to manually go through the database and find where the errant row was in the database -- a row that the GUI somehow wasn't fully seeing.
I did create a new role and access policy to use with a new group. They all work as expected for users assigned to the group, and nothing else was changed. I didn't modify any existing permissions, just duplicated the ones that were the closest to what I wanted.
I tried it again, very carefully. Same thing. The TV only shows the web context, and assigning it to the new media source kills the TV altogether. As soon as I either log out/log in again, or flush permissions, the new Media Source disappears, both from the Media Sources tool and from the TV media sources tab.
[ed. note: sottwell last edited this post 12 years, 4 months ago.]
Well, I created a very basic Media Source, no groups or policies. It works, except for one thing. When I set the path and the URL to the actual directory I want the TV to access, it loads that folder, says there's nothing to see until you actually click on the folder. At that point the images in the folder appear. Clicking on the selected image only puts the path from that specified folder in the TV field.
For example, if I specify assets/images/pages/ as the path and the URL, both set as relative, then the TV field will get pages/image.jpg in its field, instead of assets/images/pages/image.jpg. If I use an image output widget for the TV the image link is broken.
The minute I try to assign the Media Source to a group, it disappears altogether, even to the Administrator user, even in the Files tab of the Tree.
Bummer. Sounds like a bug.
Turns out that Articles doesn't use the TV's image output widget. It simply returns the raw TV content.
When you limit the scope of the Media Source to a subdirectory in the file structure, it will only return the path it is allowed to see. With an image type output widget, MODx will automatically fill in the remaining URL path to the relative root.
The solution is to have the <img> tag in your row tpl with the path to the image up to the point where your image TV's path is.
<img src="assets/images/[[+tv.image]]" alt="[[+pagetitle]]">
[ed. note: sottwell last edited this post 12 years, 4 months ago.]