Copied to clipboard

Flag this post as spam?

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


  • Bambe 45 posts 66 karma points
    Mar 31, 2011 @ 10:55
    Bambe
    0

    when save a picture in RTE(TinyMCE) then disappear ??

    Hi,

    My site is under a sub directory

    when I insert a picture

    then appear in the RTE

    the HTML code is here

    and press 'save' button or 'save and publish' button after the content, the picture disappeared

    HTML code after saved:

    img src has been modified, and rel attribute disapper too...

     

    but width's value and height's value not the same as rel attribute

    save the picture will not disappear after


    very strange... :'(

    are there any ideas??

     

    Regards,

    Bambe :)

  • Bambe 45 posts 66 karma points
    Apr 06, 2011 @ 06:18
    Bambe
    0

    Hello,

    does anyone help this problem ??

    the problem is very urgent to my project

    anyone help ??

     

    Regards,

    Bambe :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 06, 2011 @ 07:12
    Jan Skovgaard
    1

    Hi Bambe

    What version of Umbraco are you using? And are you using a virtual directory?

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 06, 2011 @ 07:20
    Jan Skovgaard
    0

    Hi Bambe

    Perhaps your issue is related to this work item for 4.6.1? http://umbraco.codeplex.com/workitem/29196

    /Jan

  • Bambe 45 posts 66 karma points
    Apr 06, 2011 @ 07:34
    Bambe
    0

    Hi Jan

    Yes the problem is same as the link

    and I use the umbraco version is 4.7.0RC

    but the article says 'Fixed in changeset a5309ce9fbfa' from hartvig

    that mean is ???

     

    Regards,

    Bambe :)

  • Bambe 45 posts 66 karma points
    Apr 12, 2011 @ 11:59
    Bambe
    1

    Hello all

    I was fix the problem,

    here is my solution...

    I survey the article http://forum.umbraco.org/yaf_postst1472_HTML-Img-tag-properties-removed-when-saving-content.aspx

    then says "Open tinyMceConfig.config in /config folder, find the img tag in validElements, locate the rel attribute and make it rel=0"

    but that's not enough....

    I find the image.js file in umbraco_client/tinymce3/plugins/umbracoimg/js folder

    and locate 'rel' at line 93 and turn rel: nl.orgWidth.value + ',' + nl.orgHeight.value to rel: '0' then save and rename image.js to images.js(*Note)

    go to umbraco/plugins/tinymce3 modify insertImage.aspx locate JsInclude1 at line 26

    and change image.js path to images.js, then touch web.config(or restart IIS), and see results :)

    the picture never stripped...

    perhaps this solution can help everyone same as my problem :)

    *Note: role of rename file because server will cache (or proxy cache?) the js file which you modified it can't be changes on the screen immediately,
              but I'm not sure is the server's cache issue? have much better solutions to without rename files?

     

    Regards,

    Bambe :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 12, 2011 @ 16:58
    Jan Skovgaard
    1

    Hi Bambe

    Good to hear you got the issue solved and thanks for sharing :-)

    /Jan

  • umbracov 38 posts 58 karma points
    Apr 20, 2011 @ 21:00
    umbracov
    0

    Hi, Your post to keep the image path intact worked great, however I am facing this new issue - Clicking on the insert media icon in the content area and selecting a media reloads the insert media screen in the content page, thus going in a loop until I cancel it. Did you ever face this issue? Is there a work around?

    Thanks.

  • Muhammad Humayun 49 posts 79 karma points
    May 22, 2012 @ 14:11
    Muhammad Humayun
    0

    Hi Bambe,

    Thanks for the help, but it alone does not help because on re-publishing the page, the whole thing occurs again.
    I have debug all this in chrome and found out the issues with width and height of the image for its aspect ratio being dealt with rel.

    I summerise these issues and the fixes for all the friends here.

    Issues

    1.    If you select an image from the media section, RTE removes the "/yourWeb/" from the image path as soon as you publish the page.
    e.g. "/yourWeb/media/localImage1.jpg" changes to "/media/localImage1.jpg"

    2.    If you use any external image which also have “/media” in its path, RTE strips everything before it assuming that it is from our media file.
    e.g. "http://externalWeb.com/media/images/image1.jpg" changes to "/media/images/image1.jpg"

    Steps to fix the above issues


    1.    Umbraco by default consideres the media path as “/media” for the website which is running at the root. For the instance not running at the root, please make sure that you add the following app key in the web.config after all the keys

    umbracoMediaPath = /yourWeb/media
    <add key="umbracoMediaPath" value="/yourWeb/media"/>


    2.     “image.js” at the path “\umbraco_client\tinymce3\plugins\umbracoimg\js”.

    a.    Line 8 Remove the method wrapping on url. i.e tinyMCEPopup.editor.documentBaseURI.toAbsolute(url)

    b.    Line 93 Change rel to 0. ie. rel: 0

    3.     “tinyMceConfig.config” at the path “/config”

    Locate the section called “validElements” and remove width, height from it along with their pipe signs and modify rel=0

    this line should look like this
    img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|title|hspace|vspace|align|umbracoorgwidth|umbracoorgheight
    |onresize|onresizestart|onresizeend|rel=0],

    Note: This will remove width and height from the image tag so actual image dimensions will be used.

    Thanks all for the help, Very much appreciated.

    Muhammad

  • Mike Cooper 10 posts 50 karma points
    Nov 17, 2012 @ 00:03
    Mike Cooper
    0

    Thank you so much Bambe and Muhammed!! The combination of your repairs fixed me up on 4.8.1! Most appreciated! Cheers!

  • Lorenzo 3 posts 23 karma points
    Jul 26, 2013 @ 12:08
    Lorenzo
    0

    Thanks a lot guys, clever solution. It worked like a charm.

  • Lorenzo 3 posts 23 karma points
    Aug 06, 2013 @ 13:00
    Lorenzo
    0

    Hi guys,

    This solution works prefectly for the images/files you had already saved, but when you save new media content, it stores it on

    /yourWeb/media/yourWeb/media


    Umbraco takes the media path added to the Web.config and appends it to the media folder. The thing is that now I have two media folders one with the content I had before the change in the Web.config and another inside this one. Any ideas ??

  • Lorenzo 3 posts 23 karma points
    Aug 06, 2013 @ 13:24
    Lorenzo
    0

    Hi again,

    It was my mistake, I didn't put the whole path from the root of my site and that is why it was creating the subfolders.

     

Please Sign in or register to post replies

Write your reply to:

Draft