none
How to hide Revert to Template Status on the SPD Customized Pages RRS feed

  • Question

  • I have customized the wiki pages through the SharePoint Designer 2010. One of the side effects of the customized pages is, yellow status bar "The current page has been customized from its template. Revert to Template" shows up on the customized pages in the browser. I am afraid that if end users clicks on the "Revert to Template", it would reset the page to the site definition. Is there anyway we can disable this yellow status gracefully for the SPD customized pages?

    On the side note, does anyone know, what does "Revert to Template" does? It seems like sometime "Revert to Template" keeps the customization and sometimes it removes the customizations. Has anyone noticed?

    Thanks in the advance

    Thursday, March 25, 2010 2:38 AM

Answers

  • Hello Nik,

    Here is some information regarding this issue:

    =================================

    When a wiki page is edited by SPD2010 in advanced mode the page will display a status bar message for all users regardless of permission level.

    The current page has been customized from its template.

    If user has adequate permissions a link to reset the page to site definition will be displayed as well.

    The current page has been customized from its template. Revert to template.

    1. Since the page is being unghosted anyways, the easiest workaround, without modifying the page with additional CSS to hide the message, is to copy the content of the page into a blank aspx page and the status message will not display since a blank aspx page is not based on a site definition.

    a. Open the page in SPD2010.
    b. Switch to code view or split view and copy the markup.
    c. Click the site pages site object.
    d. Right click in some white space to bring up the context menu.
    e. Select New > ASPX and this should get you a blank aspx page.
    f. Go into code view on the blank aspx page and paste the content you copied in step b.
    g. Save the page and set it as the new home page by right clicking on the page and picking set as home page.

    2. Option 2 is: Don't unghost the page.

    3. Another option is to create a blank web part page and set it as the home page. This can be made easier by disabling the site feature called Wiki Page Home Page and will more in tune with what users are accustomed to from the 2007 days.

    This site feature is on by default when an enterprise wiki is used to create a site or a 2010 team site.

    Description:
    Wiki Page Home Page
    This site feature will create a wiki page and set it as your site home page.

    4. You can use the CSS to hide the div that contains the status bar but this might block status bar messages you may want to see.

    Depending on your upgrade scenario some customer's have reported that the default.aspx page found in a team site is not used after an upgrade.

    I could not reproduce this but the page should reside in the root of the site and can always bet set back to the home page if this scenario does occur.

    During my testing I tested the following scenarios:

    1. Unghosted default.aspx and visual upgrade performed from the browser. Could not reproduce the issue. Wiki feature is enabled for new page creation.
    2. Ghosted default.aspx and a visual upgrade performed from the browser. Could not reproduce the issue. Wiki feature is enabled for new page creation.
    3. Ghosted default.aspx page with UpdateUserExperience flag used Windows PowerShell upgrade. Couldn't reproduce issue and wiki feature was disabled.
    4. Unghosted default.aspx page with UpdateUserExperience flag used during Windows PowerShell upgrade. Couldn't reproduce issue and wiki feature was disabled after upgrade.

    Each time I performed the upgrade I created a new web application. I didn't test this with web application that already had an upgrade performed against it but had the content database deleted.


    If you do the UpdateUserExperience flag during the Windows PowerShell command and then enable the Wiki Page Home Page site feature it will create a page in the site pages library called Home.aspx. Your upgraded default.aspx should still be around but you will have a new home page.


    The new behavior that is throwing folks off is because of the SharePoint:EmbeddedFormField. This is what the editable region on a wiki page uses. It does not like JavaScript and will strip it out. This is most likely for security reasons.
    Also, if you add an image with SPD 2010 to the editable region it will get removed server side by this control unless you prove a path that that adheres to its standard.


    The easiest way to figure this out is edit the page in a browser and take note how the src attribute is built. It should contain a URL like this:


    /sites/team site/site assets/image.jpg


    If you add it with spd the src attribute will contain a value like this:


    ../site assets/image.jpg


    The SharePoint:EmbeddedFormField does not care much for this and will remove it. Other than JavaScript I could not identify any other markup that is changed.


    The idea behind this new wiki feature is to allow users to create content without needing an HTML editor like SPD. More to the point, it is a wiki page and the idea behind wiki is to allow a lot of individuals to add content without allowing for unsafe markup that could harm your users/site due to the open nature of wikis.

    Regards,
    Dalibor K
    Microsoft Online Community Support
    Saturday, October 2, 2010 5:29 PM
  • Insert a HTML Form web part. Replace the source code with the following:

    <style type="text/css">
    body #pageStatusBar{height:0px; font-size:0px; padding:0px; border-style:none;}
    </style>

    • Proposed as answer by Eagler Thursday, August 18, 2011 7:46 AM
    • Marked as answer by Margriet Bruggeman Wednesday, April 18, 2012 2:36 PM
    Tuesday, February 1, 2011 5:22 PM
  • I have customized the wiki pages through the SharePoint Designer 2010. One of the side effects of the customized pages is, yellow status bar "The current page has been customized from its template. Revert to Template" shows up on the customized pages in the browser. I am afraid that if end users clicks on the "Revert to Template", it would reset the page to the site definition. Is there anyway we can disable this yellow status gracefully for the SPD customized pages?

    On the side note, does anyone know, what does "Revert to Template" does? It seems like sometime "Revert to Template" keeps the customization and sometimes it removes the customizations. Has anyone noticed?

    Thanks in the advance


    Hi nik,

    Open master page through SPD. Goto code view. then ctrl+F "s4-status"

    then type in style:display:none

    status bar will be hidden.

    I had similar problem too. I solved it.


    Raghunath H N
    Monday, November 29, 2010 10:16 AM

All replies

  • Is anyone from the SPD team or SharePoint team can answer? I have tried several things and only way we can disable this message if SPD page is revert back to the site definition. One one hand it has to customized but on other hand, we don't want user to click on the link to revert back to the site template.

    Any response from the product team?

    Thursday, March 25, 2010 2:24 PM
  • Hello, I have done this by locating the following block of markup in v4.master and commenting it out, you might want to make a copy of v4.master first then use the customized version. 

    <div id="s4-statusbarcontainer">
        <div id="pageStatusBar" class="s4-status-s1">
        </div>
    </div>

    • Proposed as answer by sateshb Thursday, April 8, 2010 7:42 PM
    • Marked as answer by Nik Patel Friday, April 9, 2010 2:59 AM
    • Marked as answer by Nik Patel Friday, April 9, 2010 3:00 AM
    • Unmarked as answer by Nik Patel Wednesday, August 4, 2010 3:15 PM
    • Unproposed as answer by Nik Patel Wednesday, August 4, 2010 3:15 PM
    • Proposed as answer by Martynenko Anton Thursday, July 5, 2012 11:01 AM
    Thursday, April 8, 2010 7:41 PM
  • Hi Thanks for the reply. I will try it out and let you know.

    It seems like this will hide a status bar. It means, it will suppress all other statuses like "file being checked out by different user" etc. Although it may work in our situation, it seems like MSFT doesn't have any proper solution to suppress the "Revert to the Template" message. My biggest concern here is why we need to show the option to the end user to allow them to revert back to the template and undone the developer changed customization. I am still trying to understand the motivation behind this.

    I will try it out and mark it as a resolved once its done.

    Thanks for your help,

    Nik

    Thursday, April 8, 2010 9:48 PM
  • Hi, I have the same problem...Any luck yet?

    Thanks, Luka

    Thursday, May 27, 2010 11:24 AM
  • Hi Luka,

    At this moment, the solution provided by sateshb is acceptable in my scenario but still looking for better answer on this...

    Thanks, Nik

    Sunday, May 30, 2010 2:39 AM
    • Proposed as answer by Tony_is_here Wednesday, March 20, 2013 9:06 AM
    Monday, May 31, 2010 3:34 PM
  • Wow so this has been out there for months and not a single real answer from a MS MVP, or anyone at Microsoft.  Listen I like 2010 but bugs like this are simply annoying and causing more and more of the people in my company to want to go back to 2007.  The new features are nice but when things like this and hiding the "view all site content" require massive changes to master pages or custom code, it simply is making the product less and less usable.  I am at the point of simply no longer caring, you can't create a positive user experience with things like this happening on such a regular basis.
    Denzel
    Wednesday, July 7, 2010 4:17 PM
  • So it has been several months since the original post, and a week since I asked if anyone from MS or any MVP has any type of solution or direction on this issue, but I still haven't heard anything.

    http://twitpic.com/251aee

    is a picture of what every user sees on a page that has been modified.  In this case it is a wiki page that I have used SPD to remove the recent changes section of the left nav, by deleting it.  I get the same message if I turn that section from visible to hidden as well.

    You have to be kidding me if there isn't an easy solution for this issue, come on anyone.  Something other than changing master pages?


    Denzel
    Tuesday, July 13, 2010 10:24 PM
  • in my situation I just went with the "revert to template" option but my "customisation" was that I had originally created the page in the sitepages directory, made a small change in SPD and moved it to the pages directory.

    every file that I did this to displayed the same warning.

    i clicked "revert to template" and SharePoint changed the font from Verdana 10pt back to the default Verdana 8pt so it didn't have a serious impact in my deployment.

    Now on the other hand if a developer had made a major custom development and a user with contribute rights was to revert back to the default OOTB template.....

     

    Thursday, August 19, 2010 1:58 PM
  • Tried Sohel's workaround and it didn't work. An obvious bug. Let's hope hope there will be a patch soon. This will be a deal killer for SharePoint shops since users ALWAYS click something they don't understand.
    Thursday, September 16, 2010 8:35 PM
  • Dear All,

    I just opened a case with Microsoft about this issue. Since it appears from my testing this "Revert to Template" status line does NOT occur in sites that are created natively in SharePoint 2010, this is obviously a bug. I'll keep you posted on my progress with the case.

    Kathryn

    Friday, September 17, 2010 6:07 PM
  • Thanks Kathryn.. This is obviously bug.. Please do respond with your findings..

    Nik

    Saturday, September 18, 2010 7:08 PM
  • Hello Nik,

    Here is some information regarding this issue:

    =================================

    When a wiki page is edited by SPD2010 in advanced mode the page will display a status bar message for all users regardless of permission level.

    The current page has been customized from its template.

    If user has adequate permissions a link to reset the page to site definition will be displayed as well.

    The current page has been customized from its template. Revert to template.

    1. Since the page is being unghosted anyways, the easiest workaround, without modifying the page with additional CSS to hide the message, is to copy the content of the page into a blank aspx page and the status message will not display since a blank aspx page is not based on a site definition.

    a. Open the page in SPD2010.
    b. Switch to code view or split view and copy the markup.
    c. Click the site pages site object.
    d. Right click in some white space to bring up the context menu.
    e. Select New > ASPX and this should get you a blank aspx page.
    f. Go into code view on the blank aspx page and paste the content you copied in step b.
    g. Save the page and set it as the new home page by right clicking on the page and picking set as home page.

    2. Option 2 is: Don't unghost the page.

    3. Another option is to create a blank web part page and set it as the home page. This can be made easier by disabling the site feature called Wiki Page Home Page and will more in tune with what users are accustomed to from the 2007 days.

    This site feature is on by default when an enterprise wiki is used to create a site or a 2010 team site.

    Description:
    Wiki Page Home Page
    This site feature will create a wiki page and set it as your site home page.

    4. You can use the CSS to hide the div that contains the status bar but this might block status bar messages you may want to see.

    Depending on your upgrade scenario some customer's have reported that the default.aspx page found in a team site is not used after an upgrade.

    I could not reproduce this but the page should reside in the root of the site and can always bet set back to the home page if this scenario does occur.

    During my testing I tested the following scenarios:

    1. Unghosted default.aspx and visual upgrade performed from the browser. Could not reproduce the issue. Wiki feature is enabled for new page creation.
    2. Ghosted default.aspx and a visual upgrade performed from the browser. Could not reproduce the issue. Wiki feature is enabled for new page creation.
    3. Ghosted default.aspx page with UpdateUserExperience flag used Windows PowerShell upgrade. Couldn't reproduce issue and wiki feature was disabled.
    4. Unghosted default.aspx page with UpdateUserExperience flag used during Windows PowerShell upgrade. Couldn't reproduce issue and wiki feature was disabled after upgrade.

    Each time I performed the upgrade I created a new web application. I didn't test this with web application that already had an upgrade performed against it but had the content database deleted.


    If you do the UpdateUserExperience flag during the Windows PowerShell command and then enable the Wiki Page Home Page site feature it will create a page in the site pages library called Home.aspx. Your upgraded default.aspx should still be around but you will have a new home page.


    The new behavior that is throwing folks off is because of the SharePoint:EmbeddedFormField. This is what the editable region on a wiki page uses. It does not like JavaScript and will strip it out. This is most likely for security reasons.
    Also, if you add an image with SPD 2010 to the editable region it will get removed server side by this control unless you prove a path that that adheres to its standard.


    The easiest way to figure this out is edit the page in a browser and take note how the src attribute is built. It should contain a URL like this:


    /sites/team site/site assets/image.jpg


    If you add it with spd the src attribute will contain a value like this:


    ../site assets/image.jpg


    The SharePoint:EmbeddedFormField does not care much for this and will remove it. Other than JavaScript I could not identify any other markup that is changed.


    The idea behind this new wiki feature is to allow users to create content without needing an HTML editor like SPD. More to the point, it is a wiki page and the idea behind wiki is to allow a lot of individuals to add content without allowing for unsafe markup that could harm your users/site due to the open nature of wikis.

    Regards,
    Dalibor K
    Microsoft Online Community Support
    Saturday, October 2, 2010 5:29 PM
  • I have customized the wiki pages through the SharePoint Designer 2010. One of the side effects of the customized pages is, yellow status bar "The current page has been customized from its template. Revert to Template" shows up on the customized pages in the browser. I am afraid that if end users clicks on the "Revert to Template", it would reset the page to the site definition. Is there anyway we can disable this yellow status gracefully for the SPD customized pages?

    On the side note, does anyone know, what does "Revert to Template" does? It seems like sometime "Revert to Template" keeps the customization and sometimes it removes the customizations. Has anyone noticed?

    Thanks in the advance


    Hi nik,

    Open master page through SPD. Goto code view. then ctrl+F "s4-status"

    then type in style:display:none

    status bar will be hidden.

    I had similar problem too. I solved it.


    Raghunath H N
    Monday, November 29, 2010 10:16 AM
  • Here is how to solve this problem:

    In SPD go to the page and select "Split" view.

    Highlight the picture and notice the gray working highlighted...it may look like this

    <img alt="" width="131" height="121" />

    When you insert the picture, the text changes to as follows:

     <img alt="" width="131" height="121" src="../SiteAssets/PMLogo.jpg" />

    PLEASE NOTICE TI TWO LEADING DOTS AFTER src="..

    Remove those dots so the code looks like

    <img alt="" width="131" height="121" src="/SiteAssets/PMLogo.jpg" />

     your image now loads.

    I'll post this solution on www.purplewebs.com

    Wednesday, December 8, 2010 5:54 PM
  • Any updates from the case with MS?
    Monday, January 31, 2011 10:04 PM
  • Insert a HTML Form web part. Replace the source code with the following:

    <style type="text/css">
    body #pageStatusBar{height:0px; font-size:0px; padding:0px; border-style:none;}
    </style>

    • Proposed as answer by Eagler Thursday, August 18, 2011 7:46 AM
    • Marked as answer by Margriet Bruggeman Wednesday, April 18, 2012 2:36 PM
    Tuesday, February 1, 2011 5:22 PM
  • I'm having the same issue with a 2010 team site. 

    None of the branding blogs or books I've seen has mentioned that this would be a result of customizing, so I have to assume that I've done something incorrectly.  Can anyone help?

    What messages appear in that div that would be missed if I hide it?

     

    Wednesday, February 2, 2011 4:15 AM
  • There is not a better solution for this problem than hiding status bar div. The best solution I found so far is Sohel's one. I think that this is a classical example of not thinking about all of the scenarios people will use your product (it's quite often for Sharepoint), so mine opinion is that this is the bug.

    "The idea behind this new wiki feature is to allow users to create content without needing an HTML editor like SPD. More to the point, it is a wiki page and the idea behind wiki is to allow a lot of individuals to add content without allowing for unsafe markup that could harm your users/site due to the open nature of wikis."

    This is nice but I don't want to change wiki page (content) in SPD. I just want  to change master page for it. Or maybe I want to add something that will not affect Wiki area. So I may edit it in SPD and my users may continue to use it as they use it before. And I don't want to hide status bar because it can contains some useful messages (unlike this one. I really don't know what this message "The current page has been customized from its template" will mean to standard user). If I'm administrator and I customized the page I don't want Sharepoint to remind me all the time. It woukld be the same as if one upload a document to the library that yellow status bar stands all the time with message You uploaded the document do you want to delete it). 

     


    Drasko Popovic
    Wednesday, February 9, 2011 8:56 AM
  • I've come up with a bit different solution:

        <SharePoint:SPSecurityTrimmedControl runat="server" Permissions="ManageWeb">
         <div class="s4-notdlg">
          <div id="s4-statusbarcontainer" class="s4-notdlg">
           <div id="pageStatusBar" class="s4-status-s1"></div>
          </div>
         </div>
        </SharePoint:SPSecurityTrimmedControl>

    You'll need to play around with Permissions attribute if some of the users will still need to see the yellow status bar.

    In my case it's simple since my site is targeted towards anonymous users and I don't want them to see the status bar and its messages, while I still want administrator / contributors to be able to see such alerts.

    • Proposed as answer by IoT Chris Thursday, May 3, 2012 11:17 PM
    Wednesday, May 11, 2011 10:22 AM
  • Raghunath H N,

    Thank you, this fixed the issue immediately. Excellent response.

     

    Jay

    Wednesday, August 3, 2011 4:37 AM
  • Insert a HTML Form web part. Replace the source code with the following:

    <style type="text/css">
    body #pageStatusBar{height:0px; font-size:0px; padding:0px; border-style:none;}
    </style>

    This solved the issue for me - it only affects the current page not pages under it or any other site.  Easy /quick no layout page changes - Best fix pick for me
    Thursday, August 11, 2011 1:36 PM
  • Hi all,

    I found a way to selectively hide just the "Current page has been customized..." status message and not the other ones (like "Checked out and editable").

    Read on: http://blog.ondrejsv.com/post/Getting-rid-of-The-current-page-has-been-customized-warning-in-SharePoint-2010.aspx

    Monday, December 26, 2011 5:22 PM
  • This is the most helpful post on this issue so far.

    Yes, Dalibor has explained very well the scenario and possible work arounds. Ideally this status message is only important to users while they are actively editing the page, so that they know things may not be as they seem. But I think security trimmed control points us toward a good solution when you have public facing, static content but you want internal users to be able to edit and see the status messages.

    I wouldn't like to do this in the v4 master page though, as I only want to affect 'some' wiki pages.

    So I use a combination of all of the above:

    1. In the wikipage use inline css to hide s4-statusbarcontainer
    2. then immediately after it, SecurityTrimmedControl to run inline css to show the status bar to users with the required level of permissions.

    Of course would be nice if SecurityTrimmedControl had templates for match vs not match on the Permissions value to make these kind of solutions a bit cleaner

    Friday, May 4, 2012 12:26 AM
  • <script type="text/javascript">

    ExecuteOrDelayUntilScriptLoaded(hideRevertTemplateLink, "sp.js");

    function hideRevertTemplateLink()
    {
        document.getElementById('s4-statusbarcontainer').style.display = 'none';
    }
    </script>


    Samarendra Swain Team Sharepoint http://www.mahindrasatyam.com/

    Tuesday, October 30, 2012 3:08 PM
  • It is the year 2014 and this "feature" is still alive and kicking in SharePoint 2013. Now I'm trying to figure how to suppress this stupid notification
    Wednesday, May 14, 2014 7:23 PM
  • It worked perfectly for me without accessing to SPD.

    Thank you so very much...

    Wednesday, December 16, 2015 3:34 PM