Answered by:
Custom master page issue in subsites

Question
-
Greetings!
I've run into an oddity with a custom master page on my SharePoint 2013 Enterprise server. I copied the html for the seattle master page, renamed it so it wouldn't change the seattle master, made an addition to it to add a reference to a custom css file, then threw it back up on the site so SP would make a new .master file with it. I created a new web app and site collection, put the custom css file in the Style Library and added the custom master page to the Master Pages.
So, all that being done, I changed the look of the top level site to use the new master page and it looks great and seems to be working as expected. We've got a number of subsites planned for underneath this top level site, I'm thinking no problem, just put the custom master file in the master pages and we'll be good. So I create a subsite, put the custom master page in the subsite's Master Pages, change the look. The master page and custom css apply and it looks good, but, then the problem starts.
When I go into a document library and change a view or add a view or delete a view I get back an odd response page from SP. In the url I see this: https://topsite/subsite/_vti_bin/owssvr.dll?CS=65001
and in the body of the message: 69|pageRedirect|owssvr|https://topsite/subsite/Shared%20Documents/Forms/AllItems.aspx|
When I go back into the subsite, whatever change I was attempting when I get these results worked fine.
So, why does my custom master page work fine on the top level, but not on the subsites? If I switch the subsite back to the Seattle.master, the oddity goes away, so that tells me it's something to do with my custom master page and/or custom css. I did some searching for owssvr.dll?CS=65001 and didn't see anything that helped. I checked IIS and the web.config file and don't have ASP.net tracing on that I could find.
All that the custom css is doing is increasing the size allowable for the site icon (.ms-siteicon-img) to allow for a larger icon (180px square) and it pushes the side Nav Box down a bit to make room for the larger icon and changes the font size for the side Nave Box (#sideNavBox). Since it works on the top site, I'm not suspecting the css, but, it's not making sense to me why the custom master page wouldn't work in subsites either.
I ran into this issue earlier, it was showing up when deleting folders from the document library. I thought I'd made a boo-boo somewhere in creating the custom master page, or how I'd added it, or something (kind of a learn as I go situation here), so I deleted the entire web app and recreated it, hoping for a clean start and a good master page and everything would be good. Guess I'm still missing something.
I swear that the ONLY change I made to the seattle html file for my custom page was to add this line just below the corev15.css line: <!-- SPM:<SharePoint:CssRegistration Name="/Style Library/skcustom.css" after="corev15.css" runat="server"/>-->
So, that's my sad story. Any suggestions, other than to punt on the custom master page?
Thanks!
Steven
Tuesday, December 17, 2013 3:17 PM
Answers
-
Do the following steps.
1. Enable SharePoint Server Publishing Infrastructure (Site Collection Feature) and SharePoint Server Publishing (Site Feature) in the site collection - must be in order
2. Upload the custom masterpage in the site collection (Site Settings --> Master pages and page layouts)
3. Upload it as "ASP.Net masterpage" --> Check 4 and 15 under UI versions --> Save
4. Check the newly uploaded masterpage and click Publish on the ribbon
5. Create a subsite using the "Team Site" Template
6. Go back to site collection --> Site settings --> Click Master Page under Look and Feel --> on the "system master page" choose the custom masterpage you uploaded and check "Reset all subsites to inherit this system master page setting" --> Click theme and check "Reset all subsites to inherit the theme of this site" --> Click Ok
AJ MCTS: SP 2010 Configuration MCSA: Windows 7 If you find this post useful kindly please mark it as an answer :) TY
- Edited by itsAboutSp Thursday, December 19, 2013 3:03 PM
- Proposed as answer by Steven AndrewsEditor Thursday, December 19, 2013 3:42 PM
- Marked as answer by sklepzig Thursday, December 26, 2013 3:36 PM
Thursday, December 19, 2013 3:02 PM
All replies
-
SO you verified that this is working on the Top level site.
When you created the subsite did you inherit the settings in the site collection to have the masterpage be used by the sub sites ?
Have you enabled the SP Publishing feature too ?AJ MCTS: SP 2010 Configuration MCSA: Windows 7 If you find this post useful kindly please mark it as an answer :) TY
- Proposed as answer by itsAboutSp Wednesday, December 18, 2013 2:31 PM
- Unproposed as answer by Cornelius J. van DykEditor Wednesday, December 18, 2013 3:33 PM
Tuesday, December 17, 2013 4:01 PM -
Thanks for the reply,
I perform the same steps on the top level site as the subsite, and don't get the funny page on the top level site. So, that makes me assume the top level site is working.
I went into Site Contents and clicked the New Subsite after all the Lists, Libraries, and other Apps. From there filled out the dialog that comes up, Title, Description, URL, selected Team Site template, selected Unique Permissions for the User Permissions (could that be it? I should try one with inheriting permissions), selected yes on all the navigation items (Display in Quick Launch, Display in Top Bar, Inherit Top Bar). So, if there's something else I've missed it. I did have to copy the custom master page into the subsite's Master Pages, it didn't point back to the top site's master and didn't copy my custom master page in the site creation, like it did the Seattle and Oslo masters. What have I missed there?
I've not enabled the Publishing feature yet. I thought about that, but was wanting to keep the number of variables to a minimum, since I wasn't sure what I'd done in my previous web app to break things.
Thanks again for your help.
Steven
Tuesday, December 17, 2013 4:50 PM -
Verify the following
Go to site settings of the site collection (Top Level)
Under Look and Feel do you see "Master Page" ?
The custom masterpage you've created, did you set it as default using SharePoint Designer ?
After you answer these questions I should be able to give you the correct instruction to tryAJ MCTS: SP 2010 Configuration MCSA: Windows 7 If you find this post useful kindly please mark it as an answer :) TY
Wednesday, December 18, 2013 2:33 PM -
Okay, I don't see "Master Page" under Look and Feel. (guessing you're gonna say to turn on publishing...)
I didn't set my custom page as default with SP Designer. I picked it from the list of master pages in the "Change the Look" link from the menu.
Thanks,
Steven
Wednesday, December 18, 2013 4:17 PM -
Do the following steps.
1. Enable SharePoint Server Publishing Infrastructure (Site Collection Feature) and SharePoint Server Publishing (Site Feature) in the site collection - must be in order
2. Upload the custom masterpage in the site collection (Site Settings --> Master pages and page layouts)
3. Upload it as "ASP.Net masterpage" --> Check 4 and 15 under UI versions --> Save
4. Check the newly uploaded masterpage and click Publish on the ribbon
5. Create a subsite using the "Team Site" Template
6. Go back to site collection --> Site settings --> Click Master Page under Look and Feel --> on the "system master page" choose the custom masterpage you uploaded and check "Reset all subsites to inherit this system master page setting" --> Click theme and check "Reset all subsites to inherit the theme of this site" --> Click Ok
AJ MCTS: SP 2010 Configuration MCSA: Windows 7 If you find this post useful kindly please mark it as an answer :) TY
- Edited by itsAboutSp Thursday, December 19, 2013 3:03 PM
- Proposed as answer by Steven AndrewsEditor Thursday, December 19, 2013 3:42 PM
- Marked as answer by sklepzig Thursday, December 26, 2013 3:36 PM
Thursday, December 19, 2013 3:02 PM -
Thanks. I've been experimenting with this for a few days now, and there's lots I don't understand about why and such, but your process above works. That's a big load off me right now and I really appreciate it. I'm going to be able to survive the initial roll-out and implementation of the new site. Going forward, I've got lots to learn and find out, I've already heard that there's a desire to really redesign the master page for the site and subsites, way beyond the little CSS customization I did. Fun.
If you've got a little time though, perhaps you can provide some explanation. If not, no problem.
On step 6, when I do as you detail, click the System Master Page and reset all the subsites, it seems to work fine with my custom master page. If I do that with the Site Master Page settings, my custom page causes the redirect issue in the subsites again. This is whether I do the Site Master Page by itself, or in conjunction with the System Master Page settings. If I revert back to the Seattle master page in the Site Master Page settings and my custom pate in the System Master Page, the issue goes away again. It is completely messing with my head, trying to figure out why that would be, and this is all beside trying to figure out why adding the one little CSS reference to the Seattle master to create my master page breaks things (sometimes!).
Just fyi, what I've ended up with for now is pulling my custom master page out of the system and using the Alternate CSS URL to add my custom CSS to the Seattle master page on the sites. As I thought about all this, I decided I didn't want to leave the breakable custom page out there for some unsuspecting site manager to accidentally pick and get everyone screaming about the broken sites.
Thanks again,
StevenThursday, December 26, 2013 3:36 PM -
bump
I would love to find out what is actually causing this. I pulled out my custom master page and the issue went away.
Wednesday, January 15, 2014 8:15 PM -
If/when I get back to doing a custom master page, and I figure out what it is or was that causes it, I'll let you know.
Good luck!
Thursday, February 20, 2014 4:34 PM -
Although the steps described by itsAboutSp are definitely useful, I had another / further issue as well. In my case inactivating the Minimal Download Strategy site feature solved the problem.
Regards,
PeterWednesday, October 29, 2014 10:44 AM -
This worked for us:
In your masterpage, remove the CDATA tags surrounding this script.
Change this:
<script type="text/javascript">//<![CDATA[ var submitHook = function () { return false; }; theForm._spOldSubmit = theForm.submit; theForm.submit = function () { if (!submitHook()) { this._spOldSubmit(); } }; //]]></script>
To this:
<script type="text/javascript">var submitHook = function () { return false; }; theForm._spOldSubmit = theForm.submit; theForm.submit = function () { if (!submitHook()) { this._spOldSubmit(); } }; </script> No need to disable MDS and it works.Wednesday, August 9, 2017 10:52 PM