Absolute URLs to Images/documents

12 posts, 0 answers
  1. Tammy
    Tammy avatar
    4 posts
    Member since:
    Mar 2008

    Posted 06 Nov 2008 Link to this post

    We have RadEditor for MOSS v 5.2.2 installed on our server.  When our content authors use the RadEditor webpart and place pictures or document links into the webpart it saves them with a absolute URL rather than a relative URL.  This of course causes the links to be broken when the content is migrated from Dev to Test and/or Prod.  Is there something they should be doing differently or is this a known bug?  I found similar issues discussed but was not sure they were exactly the same.  Please advise.

    Thank You!!!
  2. Stenly
    Stenly avatar
    1 posts
    Member since:
    Nov 2008

    Posted 10 Nov 2008 Link to this post

    Hi Tammy,
    I experienced the same issue, but once I upgraded the RadEditor for MOSS with the RadEditorMoss_5_3_0 everything worked fine: all the links were relative. If this does not help, I can suggest you to turn of the RadEditor’s  MakeUrlsAbsolute content filter. This can be done by modifying ToolsFile.xml or ConfigFile.xml file in
    /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/5.2.3.0__1f131a624888eeed/Resources/ folder
    (5.2.3.0__1f131a624888eeed depends on your RadEditor version).

  3. Tammy
    Tammy avatar
    4 posts
    Member since:
    Mar 2008

    Posted 14 Nov 2008 Link to this post

    We upgraded to 5.3 and are still having the same problem.  I modified the config.xml (see below) but it did
    not make a difference.  Any other suggestions?

    - <configuration>
      <property name="AllowThumbGeneration">True</property>
      <property name="MakeUrlsAbsolute">False</property>
      <property name="ConvertToXhtml">True</property>
      <property name="EnableDocking">False</property>
      <property name="ShowHtmlMode">True</property>
      <property name="ShowPreviewMode">False</property>
      <property name="ToolbarMode">ShowOnFocus</property>
      <property name="ToolsWidth">680px</property>
      <property name="Skin">Telerik</property>
      </configuration>
  4. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 17 Nov 2008 Link to this post

    Hello Tammy,

    You should use LinkManager and ImageManager dialogues that come with the RadEditor to import links and images with relative path.

    In order to enable them you need to modify the ToolsFile.xml which is located in the following folder:

    /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/5.3.0.0__1f131a624888eeed/Resources/

    Just add these lines
    <tools name="MossToolMangers"
        <tool name="LinkManager" /> 
        <tool name="ImageManager" shortcut="CTRL+G" /> 
    </tools> 
    in the root node.


    Kind regards,
    Stanimir Patarinski
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Tammy
    Tammy avatar
    4 posts
    Member since:
    Mar 2008

    Posted 17 Nov 2008 Link to this post

    The HTML link manager  does not allow the content managers to browse Moss to find
    the pages/images/documents they want to link to. 

    Is there no way to fix the problem with the MossLinkManager inserting absolute url's?


  6. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 18 Nov 2008 Link to this post

    Hello Tammy,

    You can solve this problem by creating your own content filter.

    1. You should use the OnClientLoad property of the RadEditor to attach a handler. To do this you should add the following line in the ConfigFile.xml
    <property name="OnClientLoad">OnClientLoad</property>  

    2. You can use MOSSEditorTools.js to add custom java script code to RadEditor. There you should define the OnClientLoad handler and your custom content filter.
    Here is an example that you may find useful:

    function OnClientLoad(editor, args) 
    {     
        editor.get_filtersManager().add(new MyFilter()); 
     
    MyFilter = function() 
        MyFilter.initializeBase(this); 
        this.set_isDom(false); 
        this.set_enabled(true); 
        this.set_name("RadEditor filter"); 
        this.set_description("RadEditor filter description"); 
    MyFilter.prototype = 
        getHtmlContent : function(content) 
        {                       
            var newContent = content
             
            //here you replace absolute URL
            newContentnewContent = newContent.replace(/http:\/\/mossrtm\//g, ""); 
            return newContent; 
        }, 
     
        getDesignContent : function(content) 
        {                       
            var newContent = content
            return newContent; 
        }        
                 
    MyFilter.registerClass('MyFilter', Telerik.Web.UI.Editor.Filter); 

    Just add this code at the end of MOSSEditorTools.js .

    Once you follow these steps, the absolute part of the URL should be stripped.

    I hope this helps.



    Sincerely yours,
    Stanimir
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Raj
    Raj avatar
    3 posts
    Member since:
    Dec 2009

    Posted 10 Dec 2009 Link to this post

    Hello,

    What should  be used in order leave the absolute URLS as same instead strip to relative ones.

    Can anybody hel me please?

    Thanks,
    Raj
  8. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 11 Dec 2009 Link to this post

    Hi Varun,

    Could you provide me with some additional information? What version of RadEditor for MOSS you are using? A step by step scenario of the functionality that wish to achieve will be very helpful as well.

    Thank you.

    Regards,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Raj
    Raj avatar
    3 posts
    Member since:
    Dec 2009

    Posted 11 Dec 2009 Link to this post

    Hello Telerik team,

    First of all I really appreciate your quick response.

    Questions:
    How to set the stripabsoluteanchorpath or stripabsoluteimagepath properties to false in config file so that it wont strip the absolute path making a relative path on content save. Issue I am facing is even after change the both the properties to false in my config file their fucntionality is not changing on the client side. Is there any compilatio needed or anything else need to be changed along with the config file changes?

    I am using 7.1.3 and 7.0.2 versions of Rad editor. I deployed the rad editor stuff with MCMS 2002 not MOSS.

    Thanks,
    Varun
  10. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 14 Dec 2009 Link to this post

    Hello varun,

    What you need to do is set the StripAbsoluteAnchorPaths and StripAbsoluteImagesPaths properties to false.

    Also you should know that the ConfigFile property does not have a default value set. This means that you must point the ConfigFile property to the configuration file that you intend to use.
    For example: ConfigFile="~/RadControls/Editor/ConfigFile.xml"

     


    Sincerely yours,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  11. Jan Goesaert
    Jan Goesaert avatar
    8 posts
    Member since:
    Jan 2010

    Posted 16 Apr 2010 Link to this post

    Hello everyone,

    This is all very interesting information. Unfortunately, I'm reading it a bit too late, I'm afraid.
    Our configuration-files have not been modified, leaving us now with hundreds of absolute links within our SharePoint-site.
    Is there a way to automatically overwrite all these links and turning them back to relative url's?
    I suppose that the solutions described above, will only be helpful for the links you create afterwards and will not modify already created links?

    I hope I'm wrong ;-)

    Greetings
    Jan
  12. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 20 Apr 2010 Link to this post

    Hello Jan Goesaert,

    Unfortunately RadEditor for MOSS does not have functionality, which will help you in replacing the absolute part of all the urls automatically. What you can do is to create the content filter and edit and save each item created with RadEditor. 

    Greetings,
    Stanimir
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top