+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Error adding ImageUrl to HyperLink control

Error adding ImageUrl to HyperLink control

13 posts, 0 answered
  1. Isaac
    Isaac avatar
    63 posts
    Registered:
    01 Dec 2008
    20 Feb 2009
    Link to this post
    I am running Sitefinity 3.6.  When I try to set an ImageUrl for a HyperLink I get: 

    [Libraries]f093501d-5947-4dfc-b344-e29b4afe2f12

    and the image doesn't load.  When I try to add just an Image control, I get:

    /Libraries/Event_Registration_Link_Icons/button_RegisterNow.sflb.ashx

    in the textbox when selecting the same image and the image does load.  When I copy and paste:

    /Libraries/Event_Registration_Link_Icons/button_RegisterNow.sflb.ashx

    into the ImageUrl for the HyperLink the image loads and works normally

      Does anyone have any idea why I'd be having this failure under HyperLink, but not under Image?
  2. Nikolai
    Nikolai avatar
    216 posts
    Registered:
    21 Nov 2016
    23 Feb 2009
    Link to this post
    Hello Nathan,

    This has been fixed in Sitefinity 3.6 Hotfix. We recommend you to use IE for creating of your links though, because there are still some issues under FF.

    Best wishes,
    Nikolai
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Isaac
    Isaac avatar
    63 posts
    Registered:
    01 Dec 2008
    23 Feb 2009
    Link to this post
    I am still getting the error using the hotfix.  To install the hotfix, I downloaded the patch, then unzipped it over my current project telling it to replace all files.  I then made the edits to the browsers file and the web.config file that I needed to make things work.  I went in and created a new image library and uploaded an image to it.  I then created a new page and tried to add an image link to it.  When I selected the image from the new library I got: [Libraries]2668ea8c-b2cf-4572-a3aa-d96dd6f73cf8 in the text box instead of the path information I would expect to see.

    Did I install the hotfix incorrectly, or is something else going on?

    Thank you

    -nathan
  4. Isaac
    Isaac avatar
    63 posts
    Registered:
    01 Dec 2008
    23 Feb 2009
    Link to this post
    Next time, I swear I'll read the linked upgrade instructions.  Let me follow those and I'll post back if I am still having the same problem.
  5. Isaac
    Isaac avatar
    63 posts
    Registered:
    01 Dec 2008
    23 Feb 2009
    Link to this post
    I have followed the upgrade instructions and am still receiving the error, I will try a full clean install rather than just the patch.
  6. Isaac
    Isaac avatar
    63 posts
    Registered:
    01 Dec 2008
    23 Feb 2009
    Link to this post
    I have just done a clean install and am still having the problem, getting [Libraries]then a bunch of numbers instead of path information
  7. Nikolai
    Nikolai avatar
    216 posts
    Registered:
    21 Nov 2016
    24 Feb 2009
    Link to this post
    Hi Nathan,

    Thank you for coming back to us.
    Yes we figured out what the problem is, and will try to fix it. Meanwhile there are two possible solutions:
    • Insert an image from the file system
    • Override the control. The numbers are actually the GUILD of the image.
    Sorry for the inconvenience.

    Regards,
    Nikolai
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Coskun SUNALI
    Coskun SUNALI avatar
    7 posts
    Registered:
    16 Aug 2007
    13 Mar 2009
    Link to this post
    Hi Nikolai,

    When do you think we would get a hotfix for this issue? We are about to deliver a 3.6 project and this is a killing problem for the project and because we come across to this problem almost everywhere, delivering a project with a lot of workarounds does not sound so correct to me.

    Would you share an approximate or certain date about it with us please?

    All the best.
  9. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    16 Mar 2009
    Link to this post
    Hello Coskun SUNALI,

    We are aiming to release SP1 in the beginning of April. We are actually waiting for Q1 2009 SP1 of the RadControls suite, in order to release Sitefinity with the latest controls.
    If this is not acceptable, you could override the control and its ImageUrl property, then use the overridden control.

    Let me know if you need any help for this though.

    Regards,
    Georgi
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. Coskun SUNALI
    Coskun SUNALI avatar
    7 posts
    Registered:
    16 Aug 2007
    16 Mar 2009
    Link to this post
    Hi Georgi,

    I would appreciate if you could provide a sample for this overwriting issue. So that would help anyone having this problem using Sitefinity.

    If required, I may register a formal support incident for that.

    Please let me know.

    Thank you,
    Coskun Sunali
  11. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    16 Mar 2009
    Link to this post
    Hi Coskun SUNALI,

    Here is the custom user control you could use:
    CustomDynamicHyperLink.cs
    using System; 
    using System.Data; 
    using System.Configuration; 
    using System.Linq; 
    using System.Web; 
    using System.Web.Security; 
    using System.Web.UI; 
    using System.Web.UI.HtmlControls; 
    using System.Web.UI.WebControls; 
    using System.Web.UI.WebControls.WebParts; 
    using System.Xml.Linq; 
    using Telerik.Cms.Web.UI; 
    using Telerik.Libraries; 
    using Telerik.Cms.Engine; 
     
    /// <summary> 
    /// Summary description for CustomDynamicHyperLink 
    /// </summary> 
    namespace Telerik.Samples 
        public class CustomDynamicHyperLink : DynamicHyperLink 
        { 
            public CustomDynamicHyperLink() 
            { 
                this.PreRender += new EventHandler(CustomDynamicHyperLink_PreRender); 
            } 
     
            void CustomDynamicHyperLink_PreRender(object sender, EventArgs e) 
            { 
                //take the item definition 
                string def = this.ImageUrl; 
                if (!String.IsNullOrEmpty(def)) 
                { 
                    //extract the provider, and the guid 
                    string[] keys = def.Split(']'); 
                    string providerName = keys[0].Replace("[", String.Empty); 
                    Guid itemId = new Guid(keys[1]); 
     
                    //initialize the manager with the item's provider 
                    LibraryManager manager = new LibraryManager(providerName); 
                    //get the actual item using the manager 
                    IContent item = manager.GetContent(itemId); 
                    //get the item Url with its extension 
                    this.ImageUrl = item.UrlWithExtension; 
                } 
            } 
        } 

    In order to use it, create a new class in the App_Code directory, and name it CustomDynamicHyperLink.
    To include it in the toolbox, open the web.config file and define it under <toolboxControls> node:

    <toolboxControls> 
     <clear /> 
      <add name="CustomDynamicHyperLink" section="Most popular" 
       type="Telerik.Samples.CustomDynamicHyperLink, App_Code" /> 

    I hope this example will shed some light on our Libraries API.
    Don't hesitate to contact us if you have other questions.

    Greetings,
    Georgi
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  12. Isaac
    Isaac avatar
    63 posts
    Registered:
    01 Dec 2008
    29 Apr 2009
    Link to this post
    I realize its been quite a while since there was an update on this thread.  But wanted to let the Sitefinity people know, that for me at least, updating to 3.6 SP1 fixed the problems I was having.  I still get the [Libraries] bit, but the image loads where it didn't before.

    Thank you

    -nathan
  13. Sonya
    Sonya avatar
    231 posts
    Registered:
    24 Sep 2012
    30 Apr 2009
    Link to this post
    Hello Nathan,

    We are glad the new Sitefinity version solved your problem.

    Let us know if you need further assistance.

    Greetings,
    Sonya
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
13 posts, 0 answered