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

MakePathsAbsolute error

3 Answers 21 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Michelle
Top achievements
Rank 1
Michelle asked on 12 Nov 2009, 08:23 PM

Greetings,

I have been recently evaluating the RadEditor lite in my MOSS 2007 standard farm.  We are pleased with the cross-platform improvements.

However, when you enter a URL in the form of say http://proxy.com:port  and then hit a space afterwards, it automatically makes it a link and then pops up an error that says "Error while executing filter MakePathsAbsolute - [object error]"

I see this listed as fixed in http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q1-2008-sp1-version-2008-1-515.aspx your q1-2008-sp1 fix. 

Does the Lite version not include bug fixes?  If not, does anyone have any advice on how to fix this? 


3 Answers, 1 is accepted

Sort by
0
Michelle
Top achievements
Rank 1
answered on 17 Nov 2009, 07:45 PM

No update or advice on this issue?
0
Accepted
Stanimir
Telerik team
answered on 18 Nov 2009, 01:29 PM
Hi Michelle,

Add the following javascript code the the MOSSEditorTools.js file, which is located in the Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.5.6.0__1f131a624888eeed\RadControls\Editor\Scripts\7_3_6 folder.
RadEditorNamespace.MakePathsAbsolute.prototype._updateElements = function(contentElement, tagName, attrName)
{
    var tempDiv = contentElement.ownerDocument.createElement("div");
    var elements = this._getElements(contentElement, tagName);
    if (elements)
    {
        for (var i=0;i<elements.length;i++)
        {
            var attrValue = elements[i].getAttribute(attrName, 2);
            if ("href" == attrName && attrValue)
            {
                tempDiv.innerHTML = "<a href=\""+attrValue.replace(/\"/gi,"%22") + "\">test</a>";
                if (window.RadControlsNamespace.Browser.IsIE)
                {
                    var origContent = elements[i].innerHTML;
                }
                elements[i].setAttribute("href", tempDiv.childNodes[0].getAttribute("href", 2));
                if (window.RadControlsNamespace.Browser.IsIE)
                {
                    //IE only issue - when setting the href attribute of a link and the link text also looks
                    //like a link/email then the text is overridden with the new href. We need to restore the
                    //original content
                    if ((origContent.indexOf("www.") == 0 && elements[i].innerHTML.match("[a-z]+://")) ||
                        (origContent.indexOf("mailto:") == -1 && elements[i].innerHTML.match("mailto:")))
                    {
                        elements[i].innerHTML = origContent;
                    }
                }
            }
            else if ("src" == attrName && attrValue)
            {
                tempDiv.innerHTML = "<img src=\""+attrValue.replace(/\"/gi,"%22") + "\" />";
                elements[i].setAttribute("src", tempDiv.childNodes[0].src);
            }
        }
    }
    tempDiv.innerHTML = "";
    tempDiv = null;
}

This should fix the issue.

Greetings,
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
Michelle
Top achievements
Rank 1
answered on 20 Nov 2009, 09:11 PM

thanks!

That seems to take care of the problem completely.

Tags
WebParts for SharePoint
Asked by
Michelle
Top achievements
Rank 1
Answers by
Michelle
Top achievements
Rank 1
Stanimir
Telerik team
Share this question
or