1

Topic: URL of uploaded image cut off

Hello,

Whenever I try to insert an uploaded Image the Image URL in the Insert/Edit Image Dialogue is cut off. If it for examle should say:
"http://localhost:49220/tiny_test/uploads/...etc"

it says:
"http://localhost/uploads/...etc"

I tried this on different environments with different browsers and also on a live server. The only change I am measuring is the amount of the URL that gets cut off. If I for example have the website on www.myurl.com it says http://myurl.comoads or something similar.

I have been troubleshooting for some time now. I've seen the preview url prefix gets set in the webconfig of the filemanager but if I change it from {proto}://{host} (which normally gets replaced by the site url etc. in ManagerEngine.cs) to http://localhost:49220/tiny_test the Image URL Field is filled with only "uploads/...etc".

I have no idea what to change anymore. Please help me!

EDIT: I have no symlinks (because that was the solution for http://www.tinymce.com/forum/viewtopic.php?id=28137)

Last edited by appsystems (2012-03-19 12:05:51)

2

Re: URL of uploaded image cut off

You have a custom port so configure that into preview.urlprefix and it should work.

Best regards,
Spocke - Main developer of TinyMCE

3

Re: URL of uploaded image cut off

Tried that already.

If I set the urlprefix like "{proto}://{host}:{port}" the resulting URL in the dialogue is "/uploads/etc...".
If I set it like "{proto}://{host}:49220" the result is the same.

Now interestingly if I set the urlprefix like "{proto}://test{host}" the result is "http://testlocalhost/uploads/etc...".

I don't get it.

Edit: How does logging work? I already have <add key="log.level" value="debug" /> in my web.config. But I don't see any log.

Last edited by appsystems (2012-03-20 11:46:42)

4

Re: URL of uploaded image cut off

The URL gets converted into relative urls by TinyMCE etc on the client side if they are on the same domain by default. Set relative_urls: false and remove_script_host: false to get absolute urls.

Best regards,
Spocke - Main developer of TinyMCE

5

Re: URL of uploaded image cut off

Thanks for your reply!
After writing those two lines in my init() nothing changed.
I am attaching my init() maybe it can shed some light on my issue.

tinyMCE.init({
        mode: "textareas",
        theme: "advanced",
        content_css: "<% = GetContentCSS() %>",
        document_base_url : 'http://localhost:49220/tiny_test/',
        relative_urls : false,
        remove_script_host: false,
        plugins: "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,imagemanager,filemanager"

        <%= GetButtons() %>

    });

6

Re: URL of uploaded image cut off

Looks ok. However I think the issue is with the preview.wwwroot setting probably a virtual directory issue. Enable logging and send me the log form the path logic.

Set:
log.enabled=true
log.level=debug

This will write a log with the different items used to convert an file system path to an absolute url.

Best regards,
Spocke - Main developer of TinyMCE

7

Re: URL of uploaded image cut off

I set

<add key="log.enabled" value="true" />
<add key="log.level" value="debug" />
<add key="log.path" value="logs" />

in my filemanager/web.config and imagemanager/web.config.

But I can not see any log. Not in the plugins/filemanager/logs folder and not in plugins/imagemanager/logs or anywhere else. I don't quite get the logging thing.

8

Re: URL of uploaded image cut off

If it has write access to the logs directory and you select a file you should get the parts used to produce an url out of an absolute file system root path.

Best regards,
Spocke - Main developer of TinyMCE