Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Örneholm 6 posts 27 karma points
    Aug 24, 2010 @ 21:41
    Peter Örneholm
    0

    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" ?

  • Peter Örneholm 6 posts 27 karma points
    Aug 25, 2010 @ 11:39
    Peter Örneholm
    0

    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?

  • Peter Örneholm 6 posts 27 karma points
    Aug 28, 2010 @ 13:11
  • Nagarajan 6 posts 26 karma points
    Jan 11, 2011 @ 13:00
    Nagarajan
    0

    I am also experiencing the same problem. Does any one have solution for this problem? Is there any fix for this bug

  • Nagarajan 6 posts 26 karma points
    Jan 11, 2011 @ 13:22
  • John 17 posts 37 karma points
    Apr 19, 2011 @ 01:16
    John
    0

    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?

     

  • Allan Hawkey 232 posts 303 karma points
    Sep 12, 2011 @ 11:52
    Allan Hawkey
    0

    John

    Did you ever find a solution to this?  I'm having the same issue on 4.7.

    Thanks
    Allan

  • Mattias Jonsson 11 posts 31 karma points
    Sep 22, 2011 @ 11:17
    Mattias Jonsson
    0

    I also have same problem on 4.7. Any solutions? 

  • Muhammad Humayun 49 posts 79 karma points
    May 18, 2012 @ 18:02
    Muhammad Humayun
    0

    Hi guys,

    Please share the possible solution to this problem if anyone has found one.

    Thanks

  • Muhammad Humayun 49 posts 79 karma points
    May 22, 2012 @ 14:12
  • Mike Cooper 10 posts 50 karma points
    Nov 17, 2012 @ 00:01
    Mike Cooper
    0

    Thank you Muhammed!

Please Sign in or register to post replies

Write your reply to:

Draft