Copied to clipboard

Flag this post as spam?

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


  • Martin Sørensen 12 posts 32 karma points
    Dec 16, 2010 @ 11:39
    Martin Sørensen
    0

    Problems with images vs. richtext

    Hi,

    One of our customers is experiencing two problems inserting images in the richtext editor - we can indeed confirm the first problem, but not the second.

    1) When images are inserted in the richtext editor, they look all fine. But when the page is saved, the richtext editor seems to add /~/ to the path - i.e. "/~/media/1337/myimage.jpg" which causes the image path to be broken. If I remove "/~" the image path is fine, and the image shows as expected.

    2) When images are inserted, the images are always scaled to cubic sizes - i.e. 129x129. I've stepped through the process of inserting images with the customer by phone, and can confirm that the "constrain proportions" checkbox is actually checked when the customer inserts the images. I cannot replicate the problem on my own computer, but it seems consistant on the customers computer.

    We're running a 4.5.2 on IIS 7. The customer uses lastest Firefox version for Mac.

    Any help would be appreciated - thanks a bunch in advance.

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Dec 16, 2010 @ 12:32
    Stefan Kip
    0

    This is weird. A colleague of mine is experiencing almost the exact same problem as you describe by 1).
    He get's image url's like this: "~/media/xxxx/yyyy.jpg", while I'm getting on my own laptop: "/media/xxxx/yyyy/jpg"

  • Kenneth Petersen 2 posts 22 karma points
    Dec 16, 2010 @ 14:12
    Kenneth Petersen
    0

    I am experiencing the same problem with "/~" when inserting images in the richtext editor.

    When the picture is inserted from "Media" the path is fine - without the "/~". The problem occurs when the page is saved or saved/published, but only in the editor, the path on the published page is okay, without the "/~".

    If I "Save" or "Save and publish" a second time the "/~" disappear and the picture is shown in the editor. 

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 16, 2010 @ 14:25
    Tom Fulton
    0

    Are any of you running Umbraco in a virtual directory?  I've seen this problem when running in a virtual directory but can't reproduce otherwise

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Dec 16, 2010 @ 14:26
    Stefan Kip
    0

    The colleague I was talking about is running it on the ASP.NET WebDevServer, which is not a virtual directory.

  • Kenneth Petersen 2 posts 22 karma points
    Dec 16, 2010 @ 14:39
    Kenneth Petersen
    0

    I might be running Umbraco in a virtual directory, but I´m not sure - I am running Umbraco at a external web hosting provider - UnoEuro.com

  • Martin Sørensen 12 posts 32 karma points
    Dec 16, 2010 @ 15:10
    Martin Sørensen
    0

    We're not running the site in a virtual directory. We run the website on a dedicated Windows 2008 R2 server.

  • Martin Sørensen 12 posts 32 karma points
    Dec 17, 2010 @ 10:02
    Martin Sørensen
    0

    I've done some more testing - It seems I can insert the images on the page, and the customer can continue working on the page, without it breaking the images - but as soon as the customer touches the images, same problem - the images are scaled to cubic sizes (I checked the source, and the images have the "rel" attribute set to "512,512" when ever the customer touches them) - It makes no sence..

    UPDATE

    I also found out, that perhaps the problem lies within the path of the images. The "_widthxheight" part of the path is missing. I.e. "/media/1337/myimage.jpg" when the customer inserts vs. "/media/1337/myimage_237x129.jpg" when I insert. If I modify the path to contain the "_widthxheight" part, the images shows fine and saves correctly.

  • Peter S 64 posts 106 karma points
    Dec 30, 2010 @ 10:31
    Peter S
    0

    I've got the exact same problem. I just deployed a new site to a hosting company and this problem occured. The URL starts with "~/" instead of "/". In the HTML view of tinyMCE it all looks fine, and the image is displayed in the editor. I've tried to do a string replace on the content, but that doesn't seem to work. Have to dig into this further.

    Edit:  string replace on the content does work if you do it properly :)   If I replace all "~/media/" with "/media/" it works again.

Please Sign in or register to post replies

Write your reply to:

Draft