Will not allow hyperlinks to pages in Pages folder

22 posts, 0 answers
  1. tcrawford24
    tcrawford24 avatar
    9 posts
    Member since:
    Mar 2007

    Posted 30 Mar 2007 Link to this post

    We are having trouble getting hyperlinks that link to pages in the Pages gallery to validate.  Each time we link to a page in the Pages gallery it comes back with the error popup message of "The content is invalid. Do you want to auto-correct it?  The offending content area has an error message of "You must specify a valid field value".  If we accept the popup message to auto-correct, the hyperlink is stripped and the page can be successfully published.

    I have attempted to add a variety of properties to the component including: AllowHyperlinks="True" AllowExternalUrls="True" AllowTextMarkup="True".  None of these make a difference.

    Can anyone else replicate this same issue?  What is the work around.
  2. tcrawford24
    tcrawford24 avatar
    9 posts
    Member since:
    Mar 2007

    Posted 02 Apr 2007 Link to this post

    I have not been able to figure this out.  My analysis indicates that the Rad control is reformatting the href when the LinkManager returns back to the Editor control.  The url value returned to the Editor control contains the path information.  Can a Telerik developer confirm this?  If this is so, I will not be able to use this control at all in my environment. 

    My analysis also revealed that Sharepoint treats LinkAssets differently between a stand-alone installation and a farm environment.  The RadEditor works fine in my VM test environment.  But when I use it in the farm environment I receive a "You must specify a valid field value".  The only time I do not get this error message is if the Link asset is outside of the current location of the page being edited.   Sharepoint wants to have the path information included with the link.  For example, just "personnel.aspx" will cause the error.  But http://myserver:4040/pages/personnel.aspx will work fine.  But I can't just type this entire url in to the Rad editor since it will parse the href and change it to just "personnel.aspx".

    Is there a way around this?  We really like the editor, but IMO this is a show stopper for this control.

    Can I get any assistance?

  3. tcrawford24
    tcrawford24 avatar
    9 posts
    Member since:
    Mar 2007

    Posted 09 Apr 2007 Link to this post

    I am hoping that someone can give me some assistance with this case.  Any help is greatly appreciated.
  4. Ubong
    Admin
    Ubong avatar
    328 posts

    Posted 10 Apr 2007 Link to this post


    Hello Tom,

    Yes, this is not currently possible because unlike the deafult editor, we do not yet have a Browse button when you try to edit pages ( as in screenshot). We will soon add this functionality so you can link pages you want as well.
    Thanks for your patience and understanding.

    Greetings,
    Ubong
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
  5. Rick Mason
    Rick Mason avatar
    16 posts
    Member since:
    Mar 2005

    Posted 09 May 2007 Link to this post

    This bug is frustrating our editors too. I don't have much to add at this point, other than that you can use Firefox as a workaround as the bug doesn't occur there, and that I'll post here anything I find out.
  6. Richard Finn
    Richard Finn avatar
    3 posts
    Member since:
    Mar 2005

    Posted 18 May 2007 Link to this post

    Wow! This bug is huge! Hopefully you guys will get this fixed soon, because I can't use this control until you do. You guys rock, so I find this slip-up very surprising!
  7. Richard Finn
    Richard Finn avatar
    3 posts
    Member since:
    Mar 2005

    Posted 19 May 2007 Link to this post

    As a follow up - it looks like the links are only invalid if they are pointing to pages in the pages directory of the same site as the page currently being edited.
  8. Ubong
    Admin
    Ubong avatar
    328 posts

    Posted 21 May 2007 Link to this post


    Hi Richard,

    I have good news for everyone that this has already been fixed in the new version which will be out in a few days time.

    Best Regards,
    Ubong
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. Rick Mason
    Rick Mason avatar
    16 posts
    Member since:
    Mar 2005

    Posted 21 May 2007 Link to this post

    That's good news Ubong, thank you, but are you able to give us a firm release date for the new version? It was due "in a few days" several weeks ago.
  10. Ubong
    Admin
    Ubong avatar
    328 posts

    Posted 21 May 2007 Link to this post


    Hi Rick ,

    This is true and we apologize for not keeping our word on the release.
    There have been new changes added to the release and what we can do is if anyone would like to have the pre-release build, you can open a support ticket to request it and we will send it to you.
    Thank you all for your patience.



    Kind Regards,
    Ubong
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  11. Rick Mason
    Rick Mason avatar
    16 posts
    Member since:
    Mar 2005

    Posted 21 May 2007 Link to this post

    Hi Ubong

    We'd like to take a look at the pre-release if possible, as we're back on the beta at the moment due to another bug in v1.0 which I'm told is now fixed. Unfortunately I can't open a support ticket as your website is convinced I haven't downloaded anything.

    Also, are you aware of the bug which causes text copied from Word to turn into something that looks like Greek when pasted into the Telerik editor? Our editors tell me that this happens quite often. What actually occurs is that the Symbol font is applied, so I've told them to use the "Strip spans" feature to remove it. (It's useful to strip spans anyway - is there an option which would make this automatically happen when pasting?)
  12. Ubong
    Admin
    Ubong avatar
    328 posts

    Posted 21 May 2007 Link to this post


    Hello Rick ,

    I missed the fact that editor MOSS is without support currently and in order to get the build, you will need to open a bug report or general feedback ticket for now so we can attach it.
    Sorry for any inconvenience.

    On the Greek letters, there was a problem in one of the earlier version 7.x of RadEditor in which the regular expressions (that Radeditor uses to strip the content when you paste from word) did not strip the Symbols font supplied from MS Word. This was fixed in the regular build of RadEditor and the problem should not exist in v7.1.0. When the font is Symbol then the content is displayed with Greek letters. MS Word uses often the Symbol font to display the bulleted shapes in it.

    Thus when you paste for example bulleted content from MS Word, the pasted content looks like a Greek text because of the non stripped Symbol font.

    Our suggestion is to test the latest standard build of RadEditor and see whether the problem still exists. Also, the problem should not exist with the new build.

     
    All the best,

    Ubong
    the Telerik team


    Instantly find answers to your questions at the new Telerik Support Center
  13. Richard Finn
    Richard Finn avatar
    3 posts
    Member since:
    Mar 2005

    Posted 25 May 2007 Link to this post

    Thanks for the preview of the 4.0.4.0 editor.  It still doesn't work, though...
  14. Ubong
    Admin
    Ubong avatar
    328 posts

    Posted 28 May 2007 Link to this post


    Hello Richard,

    Yes, this was the BETA as I mentioned and we now have a stage-pre-releaes build ready in which this has been fixed and tested. The problem lay in the AnchorPath Stripping mechanism of the editor. It strips links and we have switched this off aso that now the links will be submitted to the server without modifications . The MOSS link filter will not flag them as wrong. You can fix this now if you just open the editor ConfigFile.xml and add  StripAnchorPaths= false.

    Best Regards,
    Ubong
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  15. Thomas Lin
    Thomas Lin avatar
    2 posts
    Member since:
    Jul 2007

    Posted 27 Oct 2007 Link to this post

    I'm using version 4.4.1.0 and still receiving this error.  I NEED StripAnchorPaths = "true" because we do content deployment from one server to another and can't have the links pointing to absolute paths on the authoring server where the user has no access.
  16. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 31 Oct 2007 Link to this post

    Hi Thomas,

    Please, excuse us for the delay!

    We developed a new mechanism that preserves the link/image paths the way they are inserted to the RadEditor content area. Please, follow the step-by-step instructions below to enable the path keeper filter in RadEditor for MOSS:

    1) Open the \Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.4.1.0__1f131a624888eeed\RadControls\Editor\ConfigFile.xml file and register the OnClientInit event of RadEditor:

          <configuration>
            ...
              <property name="OnClientInit">OnClientInitFilter</property>
          </configuration>

    You should also set the StripAbsoluteAnchorPaths and StripAbsoluteImagesPaths properties to true, e.g.

      <property name="StripAbsoluteAnchorPaths">True</property>
      <property name="StripAbsoluteImagesPaths">True</property>

    2) Open the page with the <radE:RadHtmlField in Microsoft Office SharePoint Designer and put the following JavaScript inside the PlaceHolderAdditionalPageHead asp:content tag:

        <asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
        <script type="text/javascript">
        originalOnClientLoadFunctions = new Object();

        function OnClientInitFilter(editor)
        {
            //use the filter only on IE
            if (editor.IsIE)
            {
                //save the original onclientload function reference
                if (typeof(editor.OnClientLoad) != "undefined" && editor.OnClientLoad != null)
                {
                    originalOnClientLoadFunctions[editor.Id] = editor.OnClientLoad;
                }
                editor.OnClientLoad = OnClientLoadFilter;

                if (typeof(RadEditorNamespace.OriginalSetElementInnerHTML) == "undefined")
                {
                    RadEditorNamespace.OriginalSetElementInnerHTML = RadEditorNamespace.SetElementInnerHTML;
                    RadEditorNamespace.SetElementInnerHTML = function (elem, content)
                    {
                        content = GetStoredOriginalPathsAndAttributes(content);
                        RadEditorNamespace.OriginalSetElementInnerHTML(elem,content);
                        RestoreOriginalPathsAndAttributes(elem);
                    };
                }

                editor.OriginalSetContentMethod = editor.SetContent;
                editor.SetContent = function(content)
                {
                    if (!editor.InitialSetContentCalled)
                    {
                        editor.InitialSetContentCalled = true;
                        editor.InitialNonModifiedContent = content;
                    }
                    //Call the original editor method:
                    editor.OriginalSetContentMethod(content);
                }
                editor.OriginalPasteHtml = editor.PasteHtml;
                editor.PasteHtml = function(content, sTitle, bSelectText, bFireSelChanged, bAddUndo)
                {
                    content = GetStoredOriginalPathsAndAttributes(content);
                    editor.OriginalPasteHtml(content, sTitle, bSelectText, bFireSelChanged, bAddUndo);
                    RestoreOriginalPathsAndAttributes(editor.GetContentArea());
                }
            }
        }

        function GetStoredOriginalPathsAndAttributes(content)
        {
            var pathsRegExp = /((href|src)\s*=\s*('|")?)(.*?)(\3)(\s|(\/)?>)/ig;
            content = content.replace(pathsRegExp, "$2=$3$4$3 originalAttribute=\"$2\" originalPath=\"$4\"$6");
            return content;
        }

        function RestoreOriginalPathsAndAttributes(contentArea)
        {
            var children = contentArea.getElementsByTagName("*");
            for(var i=0; i < children.length; i++)
            {
                var currentChild = children[i];
                var originalPath = currentChild.getAttribute("originalPath");
                var originalAttribute = currentChild.getAttribute("originalAttribute");
                if (originalPath != null && originalAttribute != null)
                {
                    currentChild.removeAttribute("originalPath");
                    currentChild.removeAttribute("originalAttribute");
                    if (originalPath.toLowerCase().indexOf("mailto:")==0)
                    {
                        //fix the IE bug where a mailto link with a subject will change the anchor text
                        continue;
                    }
                   
                    //fix anchors
                    originalPath = originalPath.replace(window.location.href+"#","#");
                    //
                   
                    currentChild.removeAttribute(originalAttribute);
                    currentChild.setAttribute(originalAttribute, originalPath);
                }
            }
        }

        function OnClientLoadFilter(editor)
        {
            if (editor.InitialSetContentCalled)
            {
                editor.SetHtml(editor.InitialNonModifiedContent);
            }
            editor.InitialNonModifiedContent = null;
            //call the original OnClientLoad function
            if (typeof(originalOnClientLoadFunctions[editor.Id]) != "undefined" && originalOnClientLoadFunctions[editor.Id] != null)
            {
                originalOnClientLoadFunctions[editor.Id](editor);
            }
        }
    </script>
    <style>

          ...
       3. Save the files and test the editor.

    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  17. Thomas Lin
    Thomas Lin avatar
    2 posts
    Member since:
    Jul 2007

    Posted 31 Oct 2007 Link to this post

    This fix only PARTIALLY fixes the issue.

    I'm assuming that there should be a closing </ASP:Content> tag instead of a <style> tag below the javascript.

    It works when you select the link then publish the page.  But if you go back into the page and edit it, it has the same error (unless you change the URL in the HREF again).
  18. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 05 Nov 2007 Link to this post

    Hi Thomas Lin,

    Our suggestion is to save the content when the properties below are set to true

      <property name="StripAbsoluteAnchorPaths">True</property>
      <property name="StripAbsoluteImagesPaths">True</property>

    and after that just for test to set the
    StripAbsoluteAnchorPaths and StripAbsoluteImagesPaths properties to false and insert a link with the Hyperlink manager. Please, do not modify the link after its insertion and see whether it is inserted as it is expected.

    If this works for you, we will provide a custom solution that will set automatically the
    StripAbsoluteAnchorPaths and StripAbsoluteImagesPaths to false when inserting links and images respectively from the Hyperlink and Image managers and will set the StripAbsoluteAnchorPaths and StripAbsoluteImagesPaths properties to true, when saving the content.

    If the provided suggestion above does not  help, please provide sample content and steps to reproduce the problem on our side. We will investigate the problem and do our best to fix it.


    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  19. Steve
    Steve avatar
    21 posts
    Member since:
    Oct 2007

    Posted 22 Nov 2007 Link to this post

    I have this exact problem... We need to Strip the paths because we are on a test server, and will be going live o na different server... The problem is, I cannot insert any links, so therefore I cannot use this...

    I tried adding the JavaScript suggested and changing the config file, but it did not work at all... It warns be that the content is invalid and then takes out the link... Can you please provide me / us with a solution to this. I am ready to go live with my Web Content Management System and I really wanted to use your product for my editor... Please help...
  20. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 27 Nov 2007 Link to this post

    Hi Steve,

    Can you please try the code solution provided on 10/31/2007 but this time set the StripAbsoluteAnchorPaths and StripAbsoluteImagesPaths properties to false:

    <property name="StripAbsoluteAnchorPaths">False</property>
      <property name="StripAbsoluteImagesPaths">False</property>


    Let me know if you still experience this problem.

    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  21. pmularien
    pmularien avatar
    2 posts
    Member since:
    May 2008

    Posted 04 Nov 2008 Link to this post

    I'm curious whether or not you (Telerik) have an updated solution for this issue? We have the same problem - we need to have both Strip options set to true in order to have links work properly when doing content deployment from one server to another. However we are experiencing the issue of no longer being able to link to pages on the same subsite with these options enabled. Have you fixed this issue since this discussion was started a year ago?

    Peter
  22. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 07 Nov 2008 Link to this post

    Hello,

    Can you please let us know which RadEditor for MOSS version you are currently using? I am asking this because by default the editor will keep all links as they are entered. That is, the RadEditor for MOSS 5.x which is based on RadEditor for ASP.NET AJAX.

    Also, can you elaborate a bit on your current scenario - do you experience any problem when you do not set those options explicitly (e.g neither to true, nor to false)?

    Please let us know how a link looks like when it is entered in the editor, and what happens when this content is transferred to the other server?

    Looking forward to hearing from you,
    Tervel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top