More in this section

Forums / Developing with Sitefinity / Sitefinity 3.7 > 5 migration. JQuery no longer working

Sitefinity 3.7 > 5 migration. JQuery no longer working

5 posts, 0 answered
  1. Richard
    Richard avatar
    49 posts
    Registered:
    13 Jul 2010
    13 Jun 2012
    Link to this post

    Afternoon all.

    I am currently in the process of migrating a .net web site from Sitefinity 3.7 to a .net web app in Sitefinity 5.0.

    Migrated it fine, bar the differening api's, but now I'm finding that all my previously working jquery has just packed up.

    Or more specifically, when I try to run my site I now get a lot of ".hoverIntent Is not a function" with this applying to quite a few different functions!

    Please find below the markup for my master page that used to work! (Apologies for length, bit annoying I can't attach a master page)

    <%@ Master Language="C#" AutoEventWireup="true" Inherits="App_Master_PublicHome"
        CodeBehind="PublicHome.master.cs" %>
     
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head id="Head1" runat="server">
        <title></title>
        <meta name="google-site-verification" content="cpL40DauXBVvUZH2HaGVc9VS3CKFubIXthxnCSJM9rw" />
        <script src='<%#ResolveUrl("~/App_Master/Scripts/jquery-1.4.2.min.js")%>' type="text/javascript"></script>
        <script src='<%#ResolveUrl("~/App_Master/Scripts/jquery.anythingslider.js")%>' type="text/javascript"></script>
        <script src='<%#ResolveUrl("~/App_Master/Scripts/jquery.easing.1.2.js")%>' type="text/javascript"></script>
        <script src='<%#ResolveUrl("~/App_Master/Scripts/jquery.hoverIntent.minified.js")%>'
            type="text/javascript"></script>
        <script src='<%#ResolveUrl("~/App_Master/Scripts/jquery.uniform.js")%>' type="text/javascript"></script>
        <script src='<%#ResolveUrl("~/App_Master/Scripts/equalcolumns.js")%>' type="text/javascript"></script>
        <script src='<%#ResolveUrl("~/App_Master/Scripts/publicMegaMenu.js")%>' type="text/javascript"></script>
        <script src='<%#ResolveUrl("~/App_Master/Scripts/script.js")%>' type="text/javascript"></script>
        <!--[if lt IE 7.]>
    <script defer type="text/javascript" src="<%#ResolveUrl("~/App_Master/Scripts/pngfix.js")%>"></script>
    <![endif]-->
        <script type="text/javascript">
            function equalHeight(group) {
                tallest = 0;
                group.each(function () {
                    thisHeight = $(this).height();
                    if (thisHeight > tallest) {
                        tallest = thisHeight;
                    }
                });
                group.height(tallest);
            }
            $(document).ready(function () {
                //            equalHeight($(".showCaseHome"));
                equalHeight($(".eqCol1"));
                equalHeight($(".eqCol2"));
                equalHeight($(".subcols1"));
                equalHeight($(".subcols2"));
                equalHeight($(".col3"));
                //            equalHeight($(".socLink"));
     
            });
        </script>
        <!-- This is the script for the content slider -->
        <script type="text/javascript">
            var slider2 = ['Recipe', 'Quote', 'Image', 'Quote #2', 'Image #2'];
            function formatText(index, panel) {
                return slider2[index - 1];
            }
     
            $(function () {
                $('#slider1').anythingSlider({
                    startStopped: false, // If autoPlay is on, this can force it to start stopped
                    width: 950,  // Override the default CSS width
                    height: 210,  // Override the default CSS width
                    //              toggleControls  : true, // if true, then slide in controls on hover and slider change, hide @ other times
                    theme: 'metallic',
                    onSlideComplete: function (slider) {
                        // alert('Welcome to Slide #' + slider.currentPage);
                    }
                });
     
                $("#slide-jump").click(function () {
                    $('#slider2').anythingSlider(4);
                    return false;
                });
     
                // Report Events to console
                $('.anythingSlider').bind('slideshow_start slideshow_stop slideshow_paused slideshow_unpaused slide_init slide_begin slide_complete', function (e, slider) {
                    // show object ID + event (e.g. "slider1: slide_begin")
                    var txt = slider.$el[0].id + ': ' + e.type + ', now on panel #' + slider.currentPage;
                    $('#status').text(txt);
                    if (window.console && window.console.firebug) { console.debug(txt); } // added window.console.firebug to make this work in Opera
                });
     
            });
        </script>
        <!-- This is the script for the content slider -->
        <script type="text/javascript" charset="utf-8">
            $(function () {
                $("select, button").uniform();
            });
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ContentPlaceHolder ID="Analytics" runat="server" />
        <telerik:RadScriptManager ID="tsm" runat="server" EnablePartialRendering="true">
            <Scripts>
                <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                    Name="MicrosoftAjax.js" Path="~/App_Master/AjaxScripts-40412/MicrosoftAjax.js" />
                <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                    Name="MicrosoftAjaxWebForms.js" Path="~/App_Master/AjaxScripts-40412/MicrosoftAjaxWebForms.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <!-- Start Header -->
        <div id="headerWrapper">
            <div id="header">
                <div id="logo">
                    <a id="A1" runat="server" href="~/Default.aspx">
                        <asp:Image ID="HeaderLogo" runat="server" ImageUrl="~/App_Themes/PublicTheme/images/valpakLogo.png"
                            AlternateText="Valpak Logo" Width="407" Height="68" /></a></div>
                <div id="contactNumber">
                    <span class="contactNumb1">Call us today on</span><span class="contactNumb2">08450 682
                        572</span>
                </div>
                <div class="mainSearch1">
                    <asp:ContentPlaceHolder ID="SiteSearch" runat="server" />
                </div>
            </div>
        </div>
        <!-- End Header -->
        <!-- Start Navigation -->
        <div id="breadcrumb">
            <div id="breadcrumbInner">
                <asp:ContentPlaceHolder ID="breadCrumbContent" runat="server" />
                <asp:ContentPlaceHolder ID="loginBtnsLinks" runat="server" />
            </div>
        </div>
        <div id="navigation">
            <div id="navigationInner">
                <!--START MEGA MENU-->
                <asp:ContentPlaceHolder ID="PublicMainNav" runat="server" />
                <!--END MEGA MENU-->
                <div id="main-rt-nav">
                    <%-- <ul>
                      <li id="knowledge_centre"><asp:contentplaceholder id="KnowledgeCentre" runat="server"></asp:contentplaceholder></li>
                      <li id="logout"><asp:contentplaceholder id="LoginLogout" runat="server"></asp:contentplaceholder></li>
                    </ul>--%>
                </div>
            </div>
        </div>
        <!-- End Navigation -->
        <!-- Start Showcase Main Feature -->
        <div id="showcaseContainer">
            <asp:ContentPlaceHolder ID="ShowcaseContent" runat="server" />
        </div>
        <!-- End Showcase Main Feature -->
        <!-- Start Page container -->
        <div id="PageContainerHome">
            <asp:ContentPlaceHolder ID="HomepageContent" runat="server" />
        </div>
        <!-- End Page container -->
        <!-- Start Social Media Strip -->
        <div id="socialLinks">
            <div id="socialLinksInner">
                <asp:ContentPlaceHolder ID="SocialMediaContent" runat="server" />
            </div>
        </div>
        <!-- End Social Media Strip -->
        <!-- Start Footer -->
        <div id="footer">
            <div id="footerInner">
                <asp:ContentPlaceHolder ID="FooterContent" runat="server" />
            </div>
        </div>
        <div id="logoFooter">
            <div id="logoFooterInner">
                <asp:ContentPlaceHolder ID="logosForFooter" runat="server" />
            </div>
        </div>
        <!-- End Footer -->
        </form>
    </body>
    </html>

    Any tips, hints or even just to laugh at me would be appreciated as this is driving me nuts.

  2. Brett Whittington
    Brett Whittington avatar
    89 posts
    Registered:
    10 Aug 2012
    13 Jun 2012
    Link to this post
    Have you checked that App_Master/Scripts still exists in your sitefinity 5.0 site directory?  I do not think the script files would automatically get migrated as the migration tool only allows you to move templates (I think).  Just a thought.
  3. Brett Whittington
    Brett Whittington avatar
    89 posts
    Registered:
    10 Aug 2012
    13 Jun 2012
    Link to this post
    Deleting a double post.
  4. Richard
    Richard avatar
    49 posts
    Registered:
    13 Jul 2010
    13 Jun 2012
    Link to this post
    Hi Brett.

    Yes they have come across fine.

    When I load the page, the libraries appear to be there but the functions "just say no"
  5. Richard
    Richard avatar
    49 posts
    Registered:
    13 Jul 2010
    14 Jun 2012
    Link to this post
    Right, I've narrowed it down somewhat.

    It is something to do with the SiteSearch on the master page.

    Everything seems to work when I comment out 

     <%--  <asp:ContentPlaceHolder ID="SiteSearch" runat="server" />--%>

    If that remains, it throws a mental.
5 posts, 0 answered