Copied to clipboard

Flag this post as spam?

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


  • Dennis Milandt 190 posts 517 karma points
    Dec 12, 2009 @ 17:00
    Dennis Milandt
    0

    Possible bug: Insert/edit link in RTE on a site with multiple sites

    Consider an installation with the following websites:

    Corporate site
    Hostname: www.corpsite.com

    Brans site
    Hostname: brand.corpsite.com

    When I am logged into www.corpsite.com/umbraco and edit the page SomeBrandPage on Brand site and create a link to the SomeCorpPage in the Corp Site with the url http://www.corpsite.com/somecorppage.aspx the RTE consistently removes the domain prefix and saves <a href="/somecorppage.aspx">...</a>. It makes no difference if I use the node picker in the Insert/edit link dialog, insert the complete url directly in the url text field or if I edit the HTML of the Rich Text Area. It strips the domain prefix when I save :-(

    When I see the Properties tab on the SomeBrandPage I am editing on the Brand Site while logged in to www.corpsite.com/umbraco I can see two links to the page. The Link to document is /somecorppage.aspx and the Alternative Links is displaying http://www.corpsite.com/somecorpsite.aspx. The first link will never work as long as I am logged in to www.corpsite.com/umbraco and am browsing the Brand site in umbraco. The other link, the complete link, will work, and I would expect this to be the link saved in the Rich Text Editor when inserting a link on the Brand site linking to a page on the Corp site.

    - - Can anyone confirm this behavior or help me to figure out what is causing this?

    Kind regards
    Dennis Milandt

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Dec 12, 2009 @ 23:37
    Morten Bock
    1

    in the umbracoSettings.config there is an option:

    <useDomainPrefixes>true</useDomainPrefixes>

    This should make sure that when you use the node picker an get a link like {localLink:1234} it should render the link with the correct domain name in front of it.

  • Dennis Milandt 190 posts 517 karma points
    Dec 13, 2009 @ 13:30
    Dennis Milandt
    0

    Yup - useDomainPrefixes are set to true for the site. Was the first thing I checked :-)

    Kind regards
    Dennis Milandt

  • Dennis Milandt 190 posts 517 karma points
    Dec 13, 2009 @ 17:57
    Dennis Milandt
    0

    Also Morten, even if I in the Insert/edit link dialog type the full url, eg. http://www.corpsite.com/somecorppage.aspx, it still changes the url to just /somecorppage.aspx.

    Kind regards
    Dennis Milandt

  • Dennis Milandt 190 posts 517 karma points
    Dec 14, 2009 @ 09:55
    Dennis Milandt
    0

    I have been doing some more testing. Even when just picking a node from the Node Tree the Insert/edit link dialog, and confirming that the url is inserted as {locallink:xxxx} the link is not rendered with domain name.

    There is definitely some strange behavior when parsing the links inserted in the RTE when having an umbraco installation running multiple sites with different domains.

    Kind regards
    Dennis Milandt

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Dec 14, 2009 @ 14:01
    Morten Bock
    0

    Sounds like it might be a bug.

    If you can reproduce on a clean install, then write down the steps to do so, and file it on codeplex.

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Aug 12, 2010 @ 01:03
    Nicholas Westby
    0

    I am encountering this problem too. I'm thinking one temporary workaround would be to use Javascript to set the document location, but I haven't tried that yet. Was this ever reported on CodePlex? All I could find was the following two issues, which seem to be similar: http://umbraco.codeplex.com/workitem/19818 and http://umbraco.codeplex.com/workitem/25975 . Are there any other known workarounds?

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Aug 12, 2010 @ 01:20
    Nicholas Westby
    0

    This is the workaround I went with (using the OP's example):

    <a href="#" onclick="document.URL = 'http://' + 'www.corpsite.' + 'com/somecorppage.aspx'; return false;">

    Umbraco is "smart" enough to butcher the URL even in the onclick event if you don't concatenate multiple strings. I'm sure one could also create a JavaScript function that contains the URL and call that instead of using the inline JavaSript with the concatenated strings.

  • Byron Maas 4 posts 24 karma points
    Apr 05, 2012 @ 23:00
    Byron Maas
    0

    Anybody got the fix for this yet? Looks like a tinyMCE issue ( http://drupal.org/node/145966 ) but still can't figure out the solution.

    Same issue, different CMS. Both use TinyMCE. I've done what they suggest but no go. I've tried to 'push' the web.config file, log-out/in of umbraco, even went to the point of restarting IIS just to try and get this to go. 

    If someone else wants to give it a try and see if anyone has success, let me know.

    http://www.tinymce.com/wiki.php/TinyMCE_FAQ#Paths.2FURLs_are_incorrect.2C_I_want_absolute.2Frelative_URLs.3F

     

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Apr 05, 2012 @ 23:21
    Nicholas Westby
    0

    Byron,

    Yes, there is a solution to this in Umbraco (not sure about Drupal). In the "config" folder, there is a file called "tinyMceConfig.config". Look for the "convert_urls" key and change the value to "false". If you do not have that key present, place it under tinymceConfig/customConfig. Something like this (the rest of the contents of the file have been removed):

    <tinymceConfig>
      <customConfig>
        <config key="convert_urls">false</config>
      </customConfig>
    </tinymceConfig>

    Maybe Drupal has a similar configuration file. Or maybe they use the JSON configuration option. You can read more about the convert_urls setting here: http://www.tinymce.com/wiki.php/Configuration:convert_urls

  • Byron Maas 4 posts 24 karma points
    Apr 06, 2012 @ 00:52
    Byron Maas
    0

    Nicholas, since no one in this post talked about TinyMCE yet I was using the Drupal link as reference for TinyMCE.

    I am using Umbraco and tried you suggestion, didn't work. Do I have to 'push' something, recycle/restart something for this change to take effect?

    Thanks again, this has been a huge time vampire in trying to fix-it and work around it.

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Apr 06, 2012 @ 02:19
    Nicholas Westby
    0

    I found one annoying workaround. First, modify tinyMceConfig.config to ensure it has these elements:

    <tinymceConfig>
      <customConfig>
        <config key="convert_urls">false</config>
        <config key="relative_urls">false</config>
        <config key="remove_script_host">false</config>
        <config key="fix_list_elements">false</config>
      </customConfig>
    </tinymceConfig>

    Then modify your web.config and save it so a recompile is forced. Next, modify any URL's so they exclude "http". For example:

    <a href="//www.mysite.com/somepage.aspx">Testing</a>

    When the protocol is excluded, the protocol of the current page (e.g., HTTP, HTTPS, or FILE) is used. I have confirmed that this works. However, if you need to specify a protocol, then it would not work.

    To ensure this bug gets some attention, I recommend you vote on it here: http://umbraco.codeplex.com/workitem/30149

    I believe this is an Umbraco issue and not a tinyMce issue, as the URL only gets changed when the content node is saved. Also, I inspected the property using the Chrome debugger, and it appears Umbraco is calling tinyMCE.init incorrectly. For one, it is passing "relative_urls" with a value of "'false,false'" and "remove_script_host" with a value of "'true,false'" (it is surrounding that pair of bools with apostrophes, and so they would be treated as strings). It does, however, pass "convert_urls" as "false" (it passes that as a bool rather than string).

    Even though Umbraco is initializing tinyMCE incorrectly, I suspect Umbraco also has some server-side code that is botching URL's.

    Note that I'm using Umbraco 4.7.1 (assembly version 1.0.4281.20201).

    And one more recommendation. I think Umbraco might only botch URL's for the current domain. So if you setup a second domain so that you can access Umbraco via that domain, then maybe Umbraco wouldn't botch the URL. So suppose you are on site.com. You could point site2.com to the same website and use site2.com/umbraco/ to do any edits. I haven't tried it, but that may prevent Umbraco from screwing up the URL's.

  • Byron Maas 4 posts 24 karma points
    Apr 06, 2012 @ 17:34
    Byron Maas
    0

    Thanks, this works. I appreciate all your info and insight.

Please Sign in or register to post replies

Write your reply to:

Draft