views:

800

answers:

0

I am having all sorts of weird issues with paths in the tinyMCE. I'm not sure if it has to do with the MCImageManaI'll try to summarize my setup:

I've got a .NET website. For now the application root is at http://localhost/APP/

tiny_mce is hosted in ~/tiny_mce, the imagemanager plugin is of course in ~/tiny_mce/plugins/imagemanager

~/uploads is where I want the images to be uploaded/managed

~/tiny_mce/plugins/imagemanager/web.config contains this key: <add key="filesystem.rootpath" value="../../../upload" />

It also contains <add key="preview.urlprefix" value="{proto}://{host}/APP/" /> to account for the app root being not at the hostname root (seriously, I shouldn't have to hardcode that....but that's another issue)

So far so good -- when I browse from the image dialog in tinyMCE, I get the image browser and it browses the correct folder

The weirdness starts when I select an image. Here's what gets put in the "Image URL" box on the "Insert/edit image" form:

../APPot/upload/Image.JPG

APPot? What the hell? Shouldn't it just be "upload/Image.JPG"?

This was with

tinyMCE.init({
//.....
relative_urls: true,
remove_script_host: true,
document_base_url: 'http://localhost/APP/'
});

and also

mcImageManager.init({
relative_urls: true,
remove_script_host: true,
document_base_url: 'http://localhost/APP/'
});

I can't tell if that second one is necessary, or even doing anything

where is "ot" coming from? I assume its existance is why it can't figure out how to use the document_base_url.

If I reset the url prefix to the original setting: <add key="preview.urlprefix" value="{proto}://{host}/" />, i end up with:

../upload/DSCF0546.JPG

which actually seems a little closer. No "ot" crammed in there, but it's a directory off.

Anybody know what's going on?