Resolving Media URL:s in Richtext editor (TinyMCE v3)
I'm running Umbraco 4.5.2 beta (.NET4) on IIS7, the problem also exists in 4.5.1 and probably earlier versions as well.
The Umbraco installation (clean, no modifications) is set up as a sub-application in IIS (the parent application is empty (no files at all) so it shouldn't affect the sub-app): So the URL to the root is like this: http://example.com/mysubweb/
When inserting links to media there is a problem with the URL-resolving.
For example, when inserting an image, the URL in the dialog (after picking the image) will be "/mysubweb/media/1234/Image.jpg", and the image shows up as expected in the WYSIWYG editor (Richtext editor (TinyMCE v3)). But when you save the page the URL is saved to the database as "/media/1234/Image.jpg".
But I don't think that's the actual problem, because in the background I guess it would be fine that it points to the root there, but the actual problem is that it doesn't translate into the correct URL at render time.
So when the page is rendered the URL to the image will be "/media/1234/Image.jpg" and it won't be found (correct should be: "/mysubweb/media/1234/Image.jpg").
And it also doesn't show up correct in the WYSIWYG editor because of this.
If I try to change the URL to this: "~/media/1234/Image.jpg" by editing the HTML in TinyMCE, it will remove "~", so that will not work.
There is a similar problem when linking to a media.file.
Linking to a document using the dialog will result in a URL like this: "~/media/4321/Document.pdf".
But when TinyMCE receives this (I guess) it adds / to the beginning of the path, so at render the path will look like: "~/media/4321/Document.pdf".
So, am I doing anything wrong or is this a bug?
Shouldn't for example src="/media/123.jpg" be resolved to "/mysubweb/media/123.jpg" ?
I tried to use the Simple Editor and used tilde in the beginning of the URL:s for the images and links, and then it worked.
So I guess a URL like "~/media/4321/Image.jpg" would be correctly resolved to "/mysubweb/media/4321/Document.pdf" even after using the Richtext Editor and that the problem is that TinyMCE removes tilde, right?
I ma also having same problem for due to Virtual Path for the images. I have 4.7 verson of umbraco and when i compare code with umbraco.codeplex.com/.../a5309ce9fbfa its the perfect all the updates are there. But still this bug is there for me.
Resolving Media URL:s in Richtext editor (TinyMCE v3)
I'm running Umbraco 4.5.2 beta (.NET4) on IIS7, the problem also exists in 4.5.1 and probably earlier versions as well.
The Umbraco installation (clean, no modifications) is set up as a sub-application in IIS (the parent application is empty (no files at all) so it shouldn't affect the sub-app):
So the URL to the root is like this: http://example.com/mysubweb/
When inserting links to media there is a problem with the URL-resolving.
For example, when inserting an image, the URL in the dialog (after picking the image) will be "/mysubweb/media/1234/Image.jpg", and the image shows up as expected in the WYSIWYG editor (Richtext editor (TinyMCE v3)).
But when you save the page the URL is saved to the database as "/media/1234/Image.jpg".
But I don't think that's the actual problem, because in the background I guess it would be fine that it points to the root there, but the actual problem is that it doesn't translate into the correct URL at render time.
So when the page is rendered the URL to the image will be "/media/1234/Image.jpg" and it won't be found (correct should be: "/mysubweb/media/1234/Image.jpg").
And it also doesn't show up correct in the WYSIWYG editor because of this.
If I try to change the URL to this: "~/media/1234/Image.jpg" by editing the HTML in TinyMCE, it will remove "~", so that will not work.
There is a similar problem when linking to a media.file.
Linking to a document using the dialog will result in a URL like this: "~/media/4321/Document.pdf".
But when TinyMCE receives this (I guess) it adds / to the beginning of the path, so at render the path will look like: "~/media/4321/Document.pdf".
So, am I doing anything wrong or is this a bug?
Shouldn't for example src="/media/123.jpg" be resolved to "/mysubweb/media/123.jpg" ?
I tried to use the Simple Editor and used tilde in the beginning of the URL:s for the images and links, and then it worked.
So I guess a URL like "~/media/4321/Image.jpg" would be correctly resolved to "/mysubweb/media/4321/Document.pdf" even after using the Richtext Editor and that the problem is that TinyMCE removes tilde, right?
Work item @ Codeplex:
http://umbraco.codeplex.com/workitem/28665
I am also experiencing the same problem. Does any one have solution for this problem? Is there any fix for this bug
You can find the fix http://umbraco.codeplex.com/SourceControl/changeset/changes/a5309ce9fbfa
I ma also having same problem for due to Virtual Path for the images. I have 4.7 verson of umbraco and when i compare code with umbraco.codeplex.com/.../a5309ce9fbfa its the perfect all the updates are there. But still this bug is there for me.
Can anyone help me on this?
John
Did you ever find a solution to this? I'm having the same issue on 4.7.
Thanks
Allan
I also have same problem on 4.7. Any solutions?
Hi guys,
Please share the possible solution to this problem if anyone has found one.
Thanks
Hi Guys
Find the Solution on this link http://our.umbraco.org/forum/using/ui-questions/19026-when-save-a-picture-in-RTE%28TinyMCE%29-then-disappear-?p=0#comment117782
Thanks
Muhammad
Thank you Muhammed!
is working on a reply...