This is a migrated thread and some comments may be shown as answers.

Absolute URLs to Images/documents

11 Answers 258 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Tammy
Top achievements
Rank 1
Tammy asked on 06 Nov 2008, 09:53 PM
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!!!

11 Answers, 1 is accepted

Sort by
0
Stenly
Top achievements
Rank 1
answered on 10 Nov 2008, 11:46 AM
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).
0
Tammy
Top achievements
Rank 1
answered on 14 Nov 2008, 08:37 PM
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>
0
Stanimir
Telerik team
answered on 17 Nov 2008, 12:33 PM
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.
0
Tammy
Top achievements
Rank 1
answered on 17 Nov 2008, 05:50 PM
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?


0
Stanimir
Telerik team
answered on 18 Nov 2008, 02:12 PM
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.
0
Raj
Top achievements
Rank 1
answered on 10 Dec 2009, 05:31 PM
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
0
Stanimir
Telerik team
answered on 11 Dec 2009, 07:19 AM
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.
0
Raj
Top achievements
Rank 1
answered on 11 Dec 2009, 05:41 PM
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
0
Stanimir
Telerik team
answered on 14 Dec 2009, 10:35 AM
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.
0
Jan Goesaert
Top achievements
Rank 1
answered on 16 Apr 2010, 03:21 PM
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
0
Stanimir
Telerik team
answered on 20 Apr 2010, 08:55 AM
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.
Tags
WebParts for SharePoint
Asked by
Tammy
Top achievements
Rank 1
Answers by
Stenly
Top achievements
Rank 1
Tammy
Top achievements
Rank 1
Stanimir
Telerik team
Raj
Top achievements
Rank 1
Jan Goesaert
Top achievements
Rank 1
Share this question
or