I feel like I am making a simple/silly mistake setting up a Media Source but for the life of me I just cannot figure it out.
My goal is to create a new Media Source with access to only a single directory on the server called "resources". So I create a new Media Source and in the "basePath" and "baseUrl" setting I input "resources/". This is the relative path and so both "basePathRelative" and "baseUrlRelative" are set to yes.
This works fine on the front end. All of my image TVs show up just fine. The problem is in the manager. First, in the file tree when selecting this new Media Source nothing shows up - it's completely empty. Consequently when I'm trying to edit an image TV and add a new image the file browser doesn't display anything; I have no access to that directory. Furthermore I get no preview thumbnail because it does not recognize the file path.
I have been able to "fix" this problem in the manager by changing my "basePath" and "baseUrl" settings in the Media Source to include a forward slash before the directory name like this: "/resources/". The problem is that doing this screws up the front end so that no images that were assigned using a TV appear on the live site.
Like I said, I feel like I'm making a simple error somewhere - like I don't have a path in a configuration file set correct. I can't figure it out though and I have no idea what to do. I've seen some similar posts but nothing exactly like what I'm encountering and trying other recommended solutions has not helped.
I'm running the latest version, 2.2.6. I also DO NOT have friendly URL's enabled so I don't have the base URL path set in the head of the site. The site is running on a goDaddy server (typically don't use them, client's decision). As a side note. The site was developed on a 1and1 shared server and moved to the goDaddy's server for deployment. I DID NOT have any custom Media Sources set when the site was being developed so I cannot say whether this worked previously or not. Everything else on the site seems to be working okay. I did disable compressed CSS and Javascript after I moved the site over to goDaddy's servers. Initially the manager was not displaying at all and I saw in another post that disabling compression might solve the problem - it did.
Thanks in advance for any help. Would love to hear if others are encountering the same problem.
I'm just having almost the same issue right now.
The TV has a media-source assigned. In the file-browser I see a thumb, the frontend spits out a good image, but the "Manager-Preview" under the Image-TV Dropdown is "blank". It points to "connectors/system/phpthumb.php?..."
Trying to figure that one out.
-
☆ A M B ☆
- 24,524 Posts
Ok, so I created a directory in the web root "resources".
Then I created a Media Source, "resources", with the path and URL "resources/" both relative.
I created an image-type TV assigned to that Media Source.
Works fine. TV's thumbnail shows, front-end is as expected.
Thanks Susan, but it seems to be some sort of server-problem.
On my local-setup it is working like you describe and like exspected. But on the production-server it's not.
More obscure is the fact, that sometimes, if I hit the reload-key repeatedly, it flashes every 50th try..
I tried raising the php_memory setting, but I'll try higher ^^
-
☆ A M B ☆
- 24,524 Posts
Most likely a problem with phpThumb. Perhaps a buggy installation of ImagMagic. Or maybe even no ImageMagic installed or enabled.
I would try putting this in the head section of all templates, even without FURLs.
<base href="[[++site_url]]" />
or, if you have more than one front-end context:
<base href="[[!++site_url]]" />
Also, do you have an .htaccess file in the root (not ht.access), and if so, what's the RewriteBase?
Thanks for all of the responses. I am going to log in when I have some time later today and try placing the base href in the head of the templates and see what happens.
I have a similar problem on two out if three hosters (always MODX v2.2.10). Only modxcloud works as expected.
I have a media source that creates a special path from the id of the current resource.
id:2 - id/0000/000/00/2
id:22 - id/0000/000/20/2
id:222 - id/0000/200/20/2
...
Hovering in the file tree over an image shows the correct image.
Drag an drop also works as expected.
The filebrowsers for migx, template variables as well as tinymce display the right directory.
Image output on the fronend is also not a problem.
BUT thumbnails are always broken. phpthumbof somehow only gets the filename (without the media source pat path) of each image and therefore it can't create thumbnails.
I'm sure this is a hosting problem, but I don't have any idea what to look for.
Regards,
pepebe
[ed. note: pepebe last edited this post 12 years, 11 months ago.]