3

I'm trying to make some changes to a master page, the thing I actually want to do is test the ReplaceColor attribute within the CSS, however it seems as soon as I do so, the whole 'change the look' system breaks. Has anyone experienced this or can anyone make some suggestions on what I might do to fix it? These are the steps I've taken:

  1. Create a new Publishing Site
  2. Map a network drive to the http:\machineName_catalogs\masterpage

then either modify the built in master page:

  1. Change the Look to one that uses the oslo master page (I chose sea monster).
  2. Edit the oslo.html in the mapped network drive.
  3. Modify the example DIV to read - "This area will be filled in by content you create in your page layouts!". That is, change a '.' to a '!'.
  4. Attempt to change the look again (the preview never loads, clicking ok causes an error - detailed below).

I've also tried creating a minimal master page and going through the same steps (I copied oslo.preview to ensure it would appear in the change the look, I redirected the master page of sea monster in composed looks to my new master page, I published my master page). This gave me exactly the same error.

The preview never loads:

enter image description here

The error message as captured by the ULS log is:

The layout URL submitted to the Design Builder is invalid.
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
at Microsoft.SharePoint.ApplicationPages.DesignEditor.EnsureMasterPageIsValid(String layoutUrl) StackTrace:
at onetnative.dll: (sig=6aba1f5f-ccc4-4590-af00-b8ffe7fe99a0|2|onetnative.pdb, offset=28BE6)
at onetnative.dll: (offset=152A9)

Even if I revert the change the HTML file for the master, this doesn't fix the 'Change the Look'. I need to replace the .master with an original to fix it. Very frustrating!

3
  • I have same error when trying to change to custom look. Theme works fine on test server, but now i can't apply it to production. It also happens when in my composed look I change from custom masterpage to oslo.masterpage ... Did you find some solution? Commented Feb 26, 2013 at 10:01
  • Hey I got the same problem. Did u find any solution? That would really help me a lot! Thank you in advance!
    – user15025
    Commented Feb 26, 2013 at 16:47
  • I haven't found a solution to this problem no...
    – Ian
    Commented Apr 23, 2013 at 11:56

2 Answers 2

2

I have been to this post many times by search various keywords related to the error mentioned in the post. After working 3 weeks, now I know what is the example problem. I have been working with bootstrap responsive and everything was working fine. As soon as I remove left navigation from bootstrap.html, it generates the error shown above in the question.

Here is the part in bootstrap.html that I was removing (verticle navigation/current navigation:

<!--CS: Start Vertical Navigation Snippet-->
                    <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
                    <!--SPM:<%@Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
                    <div id="sideNavBox" class="well sidebar-nav ms-dialogHidden ms-forceWrap ms-noList span3">
                        <!--MS:<SharePoint:AjaxDelta ID="DeltaPlaceHolderLeftNavBar" BlockElement="true" CssClass="ms-core-navigation" runat="server">-->
                        <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBar" runat="server">-->
                        <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarTop" runat="server">-->
                        <!--ME:</asp:ContentPlaceHolder>-->
                        <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchTop" runat="server">-->
                        <!--ME:</asp:ContentPlaceHolder>-->
                        <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarDataSource" runat="server">-->
                        <!--ME:</asp:ContentPlaceHolder>-->
                        <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderCalendarNavigator" runat="server">-->
                        <!--ME:</asp:ContentPlaceHolder>-->
                        <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderLeftActions" runat="server">-->
                        <!--ME:</asp:ContentPlaceHolder>-->
                        <!--MS:<SharePoint:SPNavigationManager ID="QuickLaunchNavigationManager" runat="server" QuickLaunchControlId="v4QuickLaunchMenu" ContainedControl="QuickLaunch" EnableViewState="false">-->
                        <!--MS:<SharePoint:DelegateControl runat="server" ControlId="QuickLaunchDataSource">-->
                        <!--MS:<Template_Controls>-->
                        <!--MS:<PublishingNavigation:PortalSiteMapDataSource runat="server" ID="SiteMapDS" SiteMapProvider="CurrentNavigation" EnableViewState="false" StartFromCurrentNode="true" ShowStartingNode="false" TrimNonCurrentTypes="Heading">-->
                        <!--ME:</PublishingNavigation:PortalSiteMapDataSource>-->
                        <!--ME:</Template_Controls>-->
                        <!--ME:</SharePoint:DelegateControl>-->
                        <!--MS:<SharePoint:AspMenu ID="V4QuickLaunchMenu" runat="server" EnableViewState="false" DataSourceId="QuickLaunchSiteMap" UseSimpleRendering="true" Orientation="Vertical" StaticDisplayLevels="3" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="2" SkipLinkText="">-->
                        <!--ME:</SharePoint:AspMenu>-->
                        <!--ME:</SharePoint:SPNavigationManager>-->
                        <!--MS:<SharePoint:SPNavigationManager ID="TreeViewNavigationManagerV4" runat="server" ContainedControl="TreeView" CssClass="ms-tv-box">-->
                        <!--MS:<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/{0}/viewlsts.aspx" ID="idNavLinkSiteHierarchyV4" Text="<%$Resources:wss,treeview_header%>" accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>" CssClass="ms-tv-header">-->
                        <!--ME:</SharePoint:SPLinkButton>-->
                        <!--MS:<SharePoint:DelegateControl runat="server" ControlId="TreeViewAndDataSource">-->
                        <!--MS:<Template_Controls>-->
                        <!--MS:<SharePoint:SPHierarchyDataSourceControl runat="server" ID="TreeViewDataSourceV4" RootContextObject="Web" IncludeDiscussionFolders="true">-->
                        <!--ME:</SharePoint:SPHierarchyDataSourceControl>-->
                        <!--MS:<SharePoint:SPRememberScroll runat="server" ID="TreeViewRememberScrollV4" onscroll="javascript:_spRecordScrollPositions(this);" style="overflow: auto;">-->
                        <!--MS:<SharePoint:SPTreeView ID="WebTreeViewV4" runat="server" ShowLines="false" DataSourceId="TreeViewDataSourceV4" ExpandDepth="0" SelectedNodeStyle-CssClass="ms-tv-selected" NodeStyle-CssClass="ms-tv-item" SkipLinkText="" NodeIndent="12" ExpandImageUrl="/{0}/images/tvclosed.png" ExpandImageUrlRtl="/{0}/images/tvclosedrtl.png" CollapseImageUrl="/{0}/images/tvopen.png" CollapseImageUrlRtl="/{0}/images/tvopenrtl.png" NoExpandImageUrl="/{0}/images/tvblank.gif">-->
                        <!--ME:</SharePoint:SPTreeView>-->
                        <!--ME:</SharePoint:SPRememberScroll>-->
                        <!--ME:</Template_Controls>-->
                        <!--ME:</SharePoint:DelegateControl>-->
                        <!--ME:</SharePoint:SPNavigationManager>-->
                        <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchBottom" runat="server">-->
                        <hr />
                        <!--MS:<SharePoint:ClusteredSPLinkButton ID="idNavLinkViewAllV4" runat="server" Permissions="ViewFormPages" NavigateUrl="~site/{0}/viewlsts.aspx" Text="<%$Resources:wss,quiklnch_allcontent_short%>" accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>" CssClass="ms-core-listMenu-item">-->
                        <!--ME:</SharePoint:ClusteredSPLinkButton>-->
                        <!--ME:</asp:ContentPlaceHolder>-->
                        <!--ME:</asp:ContentPlaceHolder>-->
                        <!--ME:</SharePoint:AjaxDelta>-->
                    </div>
                    <!--CE: End Vertical Navigation Snippet-->

Fortunately, if you notice the code carefully, you will notice that I deleted imoprtant ContentPlaceHolder tags which are required. So finally, used following to remove left navigation:

<!--CS: Start Vertical Navigation Snippet-->
    <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
    <!--SPM:<%@Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
        <!--MS:<SharePoint:AjaxDelta ID="DeltaPlaceHolderLeftNavBar" BlockElement="true" CssClass="ms-core-navigation" runat="server">-->
        <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBar" runat="server">-->

            <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarTop" runat="server">-->
            <!--ME:</asp:ContentPlaceHolder>-->

            <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchTop" runat="server">-->
            <!--ME:</asp:ContentPlaceHolder>-->

            <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarDataSource" runat="server">-->
            <!--ME:</asp:ContentPlaceHolder>-->

            <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderCalendarNavigator" runat="server">-->
            <!--ME:</asp:ContentPlaceHolder>-->

            <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderLeftActions" runat="server">-->
            <!--ME:</asp:ContentPlaceHolder>-->

            <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchBottom" runat="server">-->
                <hr />
                <!--MS:<SharePoint:ClusteredSPLinkButton ID="idNavLinkViewAllV4" runat="server" Permissions="ViewFormPages" NavigateUrl="~site/{0}/viewlsts.aspx" Text="<%$Resources:wss,quiklnch_allcontent_short%>" accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>" CssClass="ms-core-listMenu-item">-->
                <!--ME:</SharePoint:ClusteredSPLinkButton>-->
            <!--ME:</asp:ContentPlaceHolder>-->
        <!--ME:</asp:ContentPlaceHolder>-->
        <!--ME:</SharePoint:AjaxDelta>-->
<!--CE: End Vertical Navigation Snippet-->

So, the conclusion over here is, if you are using snippets from design gallery, it comes with lots of important elements that you need to remove carefully.

Thanks

0

I would not mess with out-of-the box master pages as you're doing. It's better to create a copy of these one and work straight on the .master file or going the .htm road and uploading your template, converting it to a master page (this steps is mandatory)and then solely relying on the converted html file which will reflect changes to its binder .master file. Relevant snippets will be included on the .html file to fulfill your needs.

If the sea monster is filling your needs (guess the developers loved that giant squid recently caught on tape!), a customized xml theme might be enough.

Benjamin Niaulin has a detailled walkthrough on that process : http://bniaulin.wordpress.com/2012/07/18/sharepoint-2013-design-manager-convert-html-to-master-page/ and Randy Drisgill (http://blog.drisgill.com/) has a nice codeplex project with well documented master pages to help you (and you also have a nice twitter bootstrap 2013 branding on codeplex!)

On my side, for my current projects, I went to the classic .master provisioned without relying on the design manager (with a separate master for internet audience), never managed (yet) to have extreme branding using the provided snippets.

8
  • My Examples are arbitrary (I just chose giant squid because it looked funky) to try and prove some functionality, but I'm failing at the first hurdle. In my question it does mention I tried using a minimal master page generated through the design manager and I had exactly the same problems... I also had issues trying the generation from html (completely different problems) but I might go back and take a look at that route.
    – Ian
    Commented Feb 13, 2013 at 9:56
  • Understand, giant squid was just a side joke :) Can you reproduce this on a separate environment ? I tried to minimally edit the converted html template without issue on both SP2013 standard & enterprise environment. (You can try on a separate web application first to avoid the hurdles of having another env up & running). Commented Feb 13, 2013 at 11:06
  • I haven't yet - but have a few available thanks to the new development model we all had to set our machines up with server 2012 and SharePoint installed. I'll give it a try a little later and get back to you. Thanks so far.
    – Ian
    Commented Feb 13, 2013 at 11:32
  • Seems its just not my machine, tried it on a completely different server. Copied seattle.html / seattle.preview and renamed them both to mymaster. I then created a composed look using the master page, background image (of sea monster) and a colour scheme. I tried changing the look to my theme, and then can't change the look to any other after that... very odd.
    – Ian
    Commented Feb 13, 2013 at 17:08
  • Will try to reproduce your steps tomorrow whenever possible. Commented Feb 13, 2013 at 21:35

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