1

I have got a Strange Error Javascript. How to find out whot is a problem. Please help:

enter image description here

Here is my masterpage code:

    <%@Master language="C#"%>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/15/Welcome.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<SharePoint:SPHtmlTag dir="<%$Resources:wss,multipages_direction_dir_value%>" ID="SPHtmlTag" runat="server" >
<head runat="server">
    <meta name="GENERATOR" content="Microsoft SharePoint" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=10"/>
    <meta http-equiv="Expires" content="0" />
    <SharePoint:SPPinnedSiteTile runat="server" TileUrl="/_layouts/15/images/SharePointMetroAppTile.png" TileColor="#0072C6" />
    <SharePoint:RobotsMetaTag runat="server"/>
    <SharePoint:PageTitle runat="server">
        <asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server">
            <SharePoint:ProjectProperty Property="Title" runat="server" />
        </asp:ContentPlaceHolder>
    </SharePoint:PageTitle>
    <SharePoint:SPShortcutIcon runat="server" IconUrl="/_layouts/15/images/favicon.ico?rev=23" />
    <SharePoint:StartScript runat="server" />
    <SharePoint:CssLink runat="server" Version="15"/>
    <SharePoint:CacheManifestLink runat="server"/>
    <SharePoint:ScriptLink language="javascript" name="core.js" OnDemand="true" runat="server" Localizable="false" />
    <SharePoint:ScriptLink language="javascript" name="menu.js" OnDemand="true" runat="server" Localizable="false" />
    <SharePoint:ScriptLink language="javascript" name="callout.js" OnDemand="true" runat="server" Localizable="false" />
    <SharePoint:ScriptLink language="javascript" name="sharing.js" OnDemand="true" runat="server" Localizable="false" />
    <SharePoint:ScriptLink language="javascript" name="suitelinks.js" OnDemand="true" runat="server" Localizable="false" />
    <SharePoint:CustomJSUrl runat="server" />
    <SharePoint:SoapDiscoveryLink runat="server" />
    <SharePoint:AjaxDelta id="DeltaPlaceHolderAdditionalPageHead" Container="false" runat="server">
        <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server" />
        <SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true" />
        <asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" Visible="true" runat="server" />
    </SharePoint:AjaxDelta>
    <SharePoint:CssRegistration Name="Themable/corev15.css" runat="server" />
</head>
<body>
  <SharePoint:ImageLink runat="server"/>
  <SharePoint:SPNoScript runat="server"/>
  <SharePoint:SPClientIDGenerator runat="server" ServerControlID="DeltaPlaceHolderMain;DeltaPlaceHolderPageTitleInTitleArea;DeltaPlaceHolderUtilityContent" />
  <SharePoint:SharePointForm runat="server" onsubmit="if (typeof(_spFormOnSubmitWrapper) != 'undefined') {return _spFormOnSubmitWrapper();} else {return true;}">
    <script type="text/javascript"> var submitHook = function () { return false; }; theForm._spOldSubmit = theForm.submit; theForm.submit = function () { if (!submitHook()) { this._spOldSubmit(); } }; </script>
    <SharePoint:AjaxDelta id="DeltaSPWebPartManager" runat="server">
        <WebPartPages:SPWebPartManager runat="Server"/>
    </SharePoint:AjaxDelta>
    <asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />
    <SharePoint:AjaxDelta id="DeltaDelegateControls" runat="server">
        <SharePoint:DelegateControl runat="server" ControlId="GlobalNavigation" />
        <SharePoint:DelegateControl ControlId="GlobalSiteLink3" Scope="Farm" runat="server" Visible="false" />
    </SharePoint:AjaxDelta>
<div id="TurnOnAccessibility" style="display:none" class="s4-notdlg noindex">
    <a id="linkTurnOnAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(true);UpdateAccessibilityUI();document.getElementById('linkTurnOffAcc').focus();return false;">
    <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,master_turnonaccessibility%>" EncodeMethod="HtmlEncode"/></a>
</div>
<div id="TurnOffAccessibility" style="display:none" class="s4-notdlg noindex">
    <a id="linkTurnOffAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(false);UpdateAccessibilityUI();document.getElementById('linkTurnOnAcc').focus();return false;">
    <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,master_turnoffaccessibility%>" EncodeMethod="HtmlEncode"/></a>
</div>
<div class="s4-notdlg s4-skipribbonshortcut noindex">
    <a href="javascript:;" onclick="document.getElementById('startNavigation').focus();" class="ms-accessible ms-acc-button" accesskey="<%$Resources:wss,skipribbon_accesskey%>" runat="server">
    <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,skipRibbonCommandsLink%>" EncodeMethod="HtmlEncode"/></a>
</div>
<div class="s4-notdlg noindex">
    <a href="javascript:;" onclick="document.getElementById('mainContent').focus();" class="ms-accessible ms-acc-button" runat="server">
    <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,mainContentLink%>" EncodeMethod="HtmlEncode"/></a>
</div>
<div id="TurnOffAnimation" style="display:none;" class="s4-notdlg noindex">
    <a id="linkTurnOffAnimation" href="#" class="ms-accessible ms-acc-button" onclick="ToggleAnimationStatus();return false;">
    <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,master_disableanimation%>" EncodeMethod="HtmlEncode"/></a>
</div>
<div id="TurnOnAnimation" style="display:none;" class="s4-notdlg noindex">
    <a id="linkTurnOnAnimation" href="#" class="ms-accessible ms-acc-button" onclick="ToggleAnimationStatus();return false;">
    <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,master_enableanimation%>" EncodeMethod="HtmlEncode"/></a>
</div>
<a id="HiddenAnchor" href="javascript:;" style="display:none;"></a>
<div id="suiteBar" class="ms-dialogHidden noindex">
    <div id="suiteBarLeft">
        <div class="ms-table ms-fullWidth">
            <div class="ms-tableRow">
                <div class="ms-tableCell ms-verticalAlignMiddle">
                    <SharePoint:DelegateControl id="ID_SuiteBarBrandingDelegate" ControlId="SuiteBarBrandingDelegate" runat="server"/>
                </div>
                <SharePoint:AjaxDelta runat="server" id="DeltaSuiteLinks" BlockElement="true" CssClass="ms-core-deltaSuiteLinks">
                        <div id="suiteLinksBox">
                            <SharePoint:DelegateControl id="ID_SuiteLinksDelegate" ControlId="SuiteLinksDelegate" runat="server" />
                        </div>
                </SharePoint:AjaxDelta>
            </div>
        </div>
    </div>
    <div id="suiteBarRight">
        <SharePoint:AjaxDelta runat="server" id="DeltaSuiteBarRight" CssClass="ms-core-deltaSuiteBarRight" BlockElement="true">
                <div id="welcomeMenuBox">
  <wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false" />
                </div>
                <div id="suiteBarButtons">
                       <span class="ms-siteactions-root" id="siteactiontd">
                       <SharePoint:SiteActions runat="server" accesskey="<%$Resources:wss,tb_SiteActions_AK%>" id="SiteActionsMenuMain"
                        PrefixHtml=""
                        SuffixHtml=""
                        ImageUrl="/_layouts/15/images/spcommon.png?rev=23"
                        ThemeKey="spcommon"
                        MenuAlignment="Right"
                        MenuNotVisibleHtml="&amp;nbsp;"
                        LargeIconMode="false"
                        >
                        <CustomTemplate>
                        <SharePoint:FeatureMenuTemplate runat="server"
                            FeatureScope="Site"
                            Location="Microsoft.SharePoint.StandardMenu"
                            GroupId="SiteActions"
                            UseShortId="true"
                            >
                          <SharePoint:MenuItemTemplate runat="server"
                              id="MenuItem_ShareThisSite"
                              Text="<%$Resources:wss,siteactions_sharethissite%>"
                              Description="<%$Resources:wss,siteactions_sharethissitedescription%>"
                              MenuGroupId="100"
                              Sequence="110"
                              UseShortId="true"
                              PermissionsString="ViewPages"
                              PermissionMode="Any" />
                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"
                              Text="<%$Resources:wss,siteactions_editpage15%>"
                              Description="<%$Resources:wss,siteactions_editpagedescriptionv4%>"
                              ImageUrl="/_layouts/15/images/ActionsEditPage.png?rev=23"
                              MenuGroupId="200"
                              Sequence="210"
                              PermissionsString="EditListItems"
                              ClientOnClickNavigateUrl="javascript:ChangeLayoutMode(false);" />
                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreatePage"
                              Text="<%$Resources:wss,siteactions_addpage15%>"
                              Description="<%$Resources:wss,siteactions_createpagedesc%>"
                              ImageUrl="/_layouts/15/images/NewContentPageHH.png?rev=23"
                              MenuGroupId="200"
                              Sequence="220"
                              UseShortId="true"
                              ClientOnClickScriptContainingPrefixedUrl="OpenCreateWebPageDialog('~siteLayouts/createwebpage.aspx')"
                              PermissionsString="AddListItems, EditListItems"
                              PermissionMode="All" />
                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Create"
                              Text="<%$Resources:wss,siteactions_addapp15%>"
                              Description="<%$Resources:wss,siteactions_createdesc%>"
                              MenuGroupId="200"
                              Sequence="230"
                              UseShortId="true"
                              ClientOnClickScriptContainingPrefixedUrl="GoToPage('~siteLayouts/addanapp.aspx')"
                              PermissionsString="ManageLists, ManageSubwebs"
                              PermissionMode="Any" />
                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents"
                              Text="<%$Resources:wss,quiklnch_allcontent_15%>"
                              Description="<%$Resources:wss,siteactions_allcontentdescription%>"
                              ImageUrl="/_layouts/15/images/allcontent32.png?rev=23"
                              MenuGroupId="200"
                              Sequence="240"
                              UseShortId="true"
                              ClientOnClickNavigateUrl="~siteLayouts/viewlsts.aspx"
                              PermissionsString="ViewFormPages"
                              PermissionMode="Any" />
                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_ChangeTheLook"
                              Text="<%$Resources:wss,siteactions_changethelook15%>"
                              Description="<%$Resources:wss,siteactions_changethelookdesc15%>"
                              MenuGroupId="300"
                              Sequence="310"
                              UseShortId="true"
                              ClientOnClickNavigateUrl="~siteLayouts/designgallery.aspx"
  • 1
    Do you have a custom masterpage in your solution? if so, could you please post the code? It seems to me that there is a bad inclusion of ootb sp js files. – Xavi Aug 26 '15 at 11:20
  • Yes it is problem on Master Page !!! :) Thank You Very Much Xavi. How to bring back maser page to site definition ? – Grzegorz Z Aug 26 '15 at 11:29
  • 1
    Several possible answers to your question :) could you post the masterpage code? I think we will be able to solve the issue without the need of just reset the masterpage. – Xavi Aug 26 '15 at 11:36
  • I posted my MasterPage. :) – Grzegorz Z Aug 26 '15 at 11:42
  • 1
    I'm on it, trying to find the issue ;) – Xavi Aug 26 '15 at 11:54
3

With the peace of the mp you provided what I can see is that it is 99% equal to oslo.master. The main difference is that you removed all security trimmed controls, which should not affect in this case. I cannot tell what is going on, I don't know how you deploy the masterpage, so if you have a composed look, difficult to say.

So if you want to reset the masterpage to site definition use SP Designer: Roll back mp changes to Site Definition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.