Problems adding a DelegateControl to the BlackBand.Master in MOSS 2007 - sharepoint

I have a custom feature which adds a few controls into the AdditionalPageHead DelegateControl. This works fine on any sites which use our default.master. However the project requires the use of a publishing site which has a master page derived from BlackBand.master (which does not have the AdditionalPageHead DelegateControl included), so I made a copy of the master page from the master page gallery on the appropriate site collection and then modified it to include the following line:
<SharePoint:DelegateControl
ID="DelegateControl1"
runat="server"
ControlId="AdditionalPageHead"
AllowMultipleControls="true"/>
This should therefore include this DelegateControl within all pages using this master page. However when this is uploaded as a new version of BlackBand.master and approved as such, all the pages in the site that use it get a 404 error as if they no longer exist. If I restore the previous version of the master page then everything return to normal.
Help is appreciated as always.

The answer was that I was approaching the solution to my problem incorrectly.
To fix this I opened SharePoint designer at my site collection root and clicked on _catalogs/masterpage. Then I made a copy of BlackBand.master in the masterpage catalog. Opened it and added my line of code. Saved it and then set it as my default and custom master page (to ensure that it applied to any straight up web part pages as well as layout pages).
This worked without a problem.

Related

Sharepoint 2013 Global navigation issue

I am trying to set Global navigation for my publishing portal site in sharepoint 2013 using Managed Metadata. It works fine for Default.aspx but when I browse to Site Settings page it does not show some of navigations.
My navigation is shown bellow :
Now when I browse to default Page it shows navigation perfectly as shown bellow.
But when I browse to Site Settings page it only shows :
Problem: I have created Top Navigation using Managed Metada Service in Sharepoint 2013. It works fine for all pages such as Home.aspx, default.aspx etc... In other words it works great with WebPart Pages. But when I navigate to any of Application pages e.g. Site Settings or Site Columns( they are called application pages which by default referencing default.master page.), it is not showing my Top Nav bar with all its menu item as well as Sub menu items.
I have googled lot, finally I got solution for SharePoint 2010 from here,
First locate/find PlaceHolderTopNavBar
<asp:ContentPlaceHolder id="PlaceHolderTopNavBar"
and rename it to PlaceHolderTopNavBarOriginal,
I looked into my custom.html page for same div tag as suggested in link above but I could not. After that I find
<div class="ms-hide">
and put
<!--SPM:<asp:ContentPlaceHolder id="PlaceHolderTopNavBar" runat="server" Visible="false"/>-->
inside that div.
I have written blog here:
http://apppagetopnavigation.blogspot.in/
Hopefully this will help you all.
I'm not too sure. But I think that's caused by the fact that they're using different masterpages.
Meaning when the person that activated the cascading dropdowns forgot to make that master page the default for the site. He might have only selected set as custom master page instead of default.
Sean
I think this is a bug it happens in all SharePoint 2013 versions and also in the Office 365, in the settings pages it will always show just one level in the menu.

Site Actions Menu is not rendered on internet explorer with Sharepoint 2007

I faced an interesting problem. I have a sharepoint 2007 website. I created a new masterpage and changed default design. So i dont use default.master.
I add site actions menu to masterpage. it renders on google chrome successfully. But there is a problem on IE. I cant see a div or text related with site actions menu on html source of IE.
So what could be reason of this problem?
I am almost sure that this is a probled related to unattended removal of some javascript from master page that handles IE compatibility.
Try to compare your master and the default one and to play with removed lines.

SharePoint - Find a reference to default.aspx from a site definition

Is there a way from within a feature to locate the default.aspx which is delivered with a custom site definition.
I have a scenario where I replace the default.aspx page with a custom page, but when the feature gets deactivated I need to put the original back in place.
I have considered moving the existing default.aspx to default-old.aspx when the initial replacement happens (activated) however the existing default.aspx doesn't exist yet (when feature executes during provisioning) and hence I do not have the ability to rename the existing.
Hence my question, how can I locate through code the default.aspx page associated with a site definition?
thx
You can use SPWeb.Navigation.Home.Url
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.navigation.spnavigation.home.aspx
I would give your new/updated default page a different name, deploy and then change the welcome page of the site by code in a feature receivers feature activated event. If you are working with Moss 2007 you can use the PublishingWeb.DefaultPage property or for WSS this approach.

SharePoint error relating to page layout after creating site from template

Inside SharePoint I've previously created a site template by appending _layouts/savetmpl.aspx to the end of my site and new sites have been created correctly and work as expected.
I've now come to do the same thing again and yet this time the new site is throwing an error relating to the page layout.
The error is:
This page is not using a valid page layout. To correct the problem, edit page settings and select a valid page layout.
When I try to select a different one, there is only the one to select. This page layout is in use on other sites and they render fine.
Has anyone else seen this issue?
All the best
First, if you append the _layouts/savetmpl.aspx tho the url, i suppose you dont have it in the Site Settings options, so you are using a Publishing site. This is because Microsoft doesn´t support this option (save as template in publishing sites). And they dont support it because it has some bugs, for sure.
So, I would recommend not using this option in important sites, or if you plan to ask support to Microsoft in the future.
However that error indicates that the page layout or his associated content type (ou parent content types) are not correctly installed in the site collection. Are you using your own (custom) content types? Please confirm if the ID of the associated content type (something like 0x0100C6739B7D12DE419aA2F9A2F96CC26818) is exactly the same in the Page Layout on working sites and in the not working sites.
Hope it helps
Do the sites/site collection where the templates working have all the same features enabled as teh sites/site collection where the template isn't working?
Can you check the server logs? <12 hive>\LOGS
Did you add a custom page layout, use it, and then forget to check that "save content" checkbox when you saved your template?

SharePoint Preserve Page Properties and WebParts

Hi I was wondering If there is away to save a page in sharepoint. I want to save the default page, and replicate it on a mirror server. I want the web parts in the same place, and the properties of the web parts to stay intact. Any suggestions? Thank you.
You might also look into using SharePoint Content Deployment which was designed with pushing out pages from a master site out to cloned sites.
You can view the page is SharePoint Designer and disassociate it with its Page Layout. That will bring the content of the page into Designer. You can then copy it to another file. However, this is fraught with problems:
Any dependent list and relative urls would not be copied over. You would have to move it manually.
By disassociating the page from its layout you are in effect going to slow down the retrieval of the page. Since this will also have to be done on the destination page, both pages are going to slow down.
I have found that its always better to do an export of the site and then import it to a destination site.
I don't condone this product as I haven't used it but you can also try:- http://www.softlow.com/windows/business/management/free/web-part-page-cloner-for-sharepoint.html

Resources