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

Forums / Developing with Sitefinity / Lightbox in 3.6

Lightbox in 3.6

8 posts, 0 answered
  1. KMac
    KMac avatar
    133 posts
    Registered:
    15 Dec 2008
    18 Mar 2009
    Link to this post
    Hello,

    Just upgraded a site to 3.6 and noticed that my photo gallery doesn't work with the lightbox option anymore. Instead of opening a clicked image with the fancy lightbox window, it just opens in a new ie window. There are javascript errors that say:

    element.style is undefined in Sitefinity/ExternalLibraries/lightbox/js/lightbox.js
    Line 107

    and 

    myLightbox is undefined in Sitefinity/ExternalLibraries/lightbox/js/lightbox.js
    Line 107

    Any ideas why I'm getting these errors all of a sudden?

    Kalvin
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    20 Mar 2009
    Link to this post
    Hello Kalvin MacLeod,

    We have updated the Lightbox library as well. Please try to get this javascript file from your old project, and replace it with one in the new project. You could backup the new file though.

    Sincerely yours,
    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.
  3. KMac
    KMac avatar
    133 posts
    Registered:
    15 Dec 2008
    24 Mar 2009
    Link to this post
    Hi there,

    I was actually wrong as to why the lightbox stopped working. It wasn't to do with the upgrade to 3.6. What's actually happening is this:

    I've added the following code to my master pages:

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    <Scripts
    >
                 
    <asp:ScriptReference name="" Assembly="" Path="~/includes/javascript/jquery-1.3.1.min.js"></asp:ScriptReference
    >
    </Scripts
    >
    </asp:ScriptManager
    >

    This for some reason causes the lightbox to stop working with the errors above. The moment I remove this scriptReference from the ScriptManager the lightbox works fine again. I could add the reference to the javascript file in the head section but then I run into relative path issues which I thought the ScriptReference was supposed to help avoid. Anybody have any idea why this is happening? Is there a better way to add the jquery reference to my masterpage?

     


     

  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    25 Mar 2009
    Link to this post
    Hello Kalvin,

    Well, we hava jQuery and some other frameworks build in Sitefinity. To get a reference to them, you could use the following approach in your master pages (or in your controls):
    <sf:JsFileLink id="jsLink" runat="server" ScriptType="jQuery"></sf:JsFileLink> 
    <sf:JsFileLink id="jsLink" runat="server" ScriptType="prototype"></sf:JsFileLink> 
    <sf:JsFileLink id="jsLink" runat="server" ScriptType="mooTools"></sf:JsFileLink> 
     

    Please try with this approach.

    Kind regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  5. KMac
    KMac avatar
    133 posts
    Registered:
    15 Dec 2008
    25 Mar 2009
    Link to this post
    Something funny is going on here. When I use the jsFileLink, the lightbox now works and the Jquery code I have works on every page except the photo gallery that has the lightbox. Are the two scripts incompatible?
  6. James Reategui
    James Reategui avatar
    22 posts
    Registered:
    14 Oct 2008
    26 Mar 2009
    Link to this post
    I added the
    <sf:JsFileLink id="jsLink" runat="server" ScriptType="jQuery"><sf:JsFileLink>  

    in the <head> of my MasterPage but when I run it says "unrecognized tag filter or prefix" etc.

    What am I doing wrong.. I'm running SF 3.6 with latest update.
  7. KMac
    KMac avatar
    133 posts
    Registered:
    15 Dec 2008
    26 Mar 2009
    Link to this post
    Hey James,

    I had to register the assembly at the top of the page like this:

    <%

    @ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sf" %>

    but like I said above, it's still doing something wonky. Hopefully you have better luck.

    Kalvin

     

  8. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    30 Mar 2009
    Link to this post
    Hello,

    Please try adding Telerik.Framework reference as well.
    Let us know if the issue is fixed.

    Greetings,
    Georgi
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Register for webinar
8 posts, 0 answered