0

I am having problems getting rid of the small search bar in my custom pages.

I have created a custom MasterPage, and in that I have removed the search bar code. I then created a page layout, previewing it, to confirm there is no small search bar, just the large search added as part of the page layout.

However, when creating a page from the layout, I end up with the small search appearing. This despite being completely removed from my MasterPage and PageLayout code.

What is causing the search box to appear on my live page?

enter image description here

From the Custom PageLayout:

<mso:HtmlDesignFromMaster msdt:dt="string">http://PathRedacted/masterpage/kb.html, PathRedacted/masterpage/kb.html</mso:HtmlDesignFromMaster>

The file referenced here is my custom MasterPage. The system is using the correct files.

Here is an additional screenshot showing the F12 of the page, vs the MasterPage: enter image description here

0

Check again if you have publish the modified page layout and the correct master page is being referred to. Still its appearing then i will prefer adding a CSS attribute in the master page to hide the small search block.

  • Yes I have published the MasterPage and Page Layout. I have been trying to resolve this for a week now before posting on here. I cannot add CSS code to my MasterPage as you suggest, because there is no code for the search block in my MasterPage, therefore the suggested CSS code would be referencing a content block which doesn't exist. What I want to know is, what in SharePoint 2013 has the permission to override my MasterPage and PageLayout files? Nothing should be overriding these settings. – SoulRider May 17 '16 at 11:05
  • what modification you did to remove the Search web part – Ankit Kumar May 17 '16 at 11:07
  • and you can always add a CSS code to hide the search block. Once you have made the correct changes and have published the site, you will be able to see the changes in your SharePoint site. It wont be overridden by any other default feature – Ankit Kumar May 17 '16 at 11:11
  • please check if you are referring the correct master page by going to Site Settings and then under the Look and Feel section, choose Master Page, check if correct one is being referred. – Ankit Kumar May 17 '16 at 11:13
  • As explained, I am definitely referring to the correct MasterPage and PageLayout. The PageLayouts are created from the MasterPage in Design Manager. I have had this issue for a week now and my colleagues have looked at it and cannot see why either. As for the change I made to the Master Page, I removed the entire div related to Search, starting with - <div class="ms-tableCell ms-verticalAlignTop"> – SoulRider May 17 '16 at 11:17
0

Try this:

  1. To remove: Look for 'PlaceHolderSearchArea' content place holder see if it's present in your custom master page. Move that placeholder to the bottom of the master page where all other hidden content place holders are. Also make sure there are no duplicates.

    <asp:ContentPlaceHolder ID="PlaceHolderSearchArea" runat="server"  Visible="false" />
    
  2. (to hide):

Find

<div id="searchInputBox">

change it to

<div id="searchInputBox" style="display:none;">
  • Thanks for the reply. I removed the entire div which contains PlaceHolderSearchArea etc from my master page when it was created, so none of this code is in my MasterPage. There is no reference to 'Search' at all in my MasterPage. To clarify - the removed div was lines 264-275 of the Seattle Master page. – SoulRider May 17 '16 at 14:37
  • Go to settings page and see if the SearchBox disappears. What's the URL you're referring to for your live page and which page layout you're using? – Aveenav May 17 '16 at 14:57
  • I am using a custom Master & PageLayout, which are in the standard SharePoint locations. For the settings page, I assume you mean site settings? Yes, the search box disappears there. The Page Layout is Approved and configured as the default template for the site. Everything is working correctly, apart from this search box. Could you elaborate on your URL question? Also note I am using 3 templates on the site, and all are having this same issue. – SoulRider May 17 '16 at 15:19
  • Do you see expected behavior when you change your page layout to any of the out of the box page layout? I'm starting to think it's either you page layout or master page not applied (there are two places where master page needs to be applied: custom and system) Verify using SharePoint Designer if both are set. – Aveenav May 17 '16 at 15:34
  • I see expected behaviour everywhere across all sites, except for this search issue on the Knowledge Base site. Both MasterPage and PageLayout are properly applied, as evidenced by the pages displaying correctly. The only anomaly across all 10 sites is this search box in this Enterprise Wiki site. Verified both are set. Verified pages are configured correctly as the site templates, and confirmed the site templates are being used. I haven't been able to find an instance of this happening anywhere outside these pages. We even recreated the MasterPages and PageLayouts, still the same issue. – SoulRider May 17 '16 at 15:39

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.