11

Does anyone know what the yellow section means and how to fix it?

enter image description here

11

The message means that you (or somebody else with permission) have made customizations on the page which deviates from the page template. This is a state of the page called un-ghosted.

If you don't want these customizations, simply click the link "Revert to template" and the page will go back to use its template (ghosted).

If you simply want to remove the message and keep customizations, you can hide it in css with the following

#pageStatusBar{
  height:0px; 
  font-size:0px; 
  padding:0px; 
  border-style:none;
}

or

#pageStatusBar{
    display:none!important;
}
  • 4
    I believe your terms are reversed. A ghosted page is one that has not been customized; all pages are ghosted OOTB. When you customize a page it then becomes un-ghosted. – Dan Henderson Jul 11 '16 at 22:15
  • 1
    @DanHenderson Thanks. I've fixed it now (three years later) – Benny Skogberg Jun 20 at 13:51
6

all you need is...

#DeltaPageStatusBar {
  display: none;
}

in either your css or in style tags in your page.

  • I used this one. Really sucks that this is the only solution. – Nacht Mar 9 '18 at 0:15
0

Add the following CSS code in the page:

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

A colleague tried

'#DeltaPageStatusBar { display: none; }

but this got stripped out so did not work.

However, fix that worked:

  1. copy all the data from the page,
  2. click on the link in the warning in order to revert to original template. That clears the warning.
  3. paste the data back in.

All is well.

0

I tried this a number of times and it never worked.

This is what I did in SharePoint Designer 2013 to solve the problem:

On an open browser view of the page: Right Click; inspect element.

Note the style sheet the element is referencing and the line number.

Go to SharePoint Designer, from advanced edit window select style tab.

Manage Styles find the style and double click it.

In the new edit window that pops up edit the line - everything between {} after#pageStatusBar to

{ display:none!important; }

I saved mine as a new CSS sheet and then attached the style to avoid changing any regional settings used elsewhere in the farm.

I hope this helps.

0

The CSS provided in the other answers is good, if you want to completely hide the status bar.

The downside to this is that you can't use the built-in status methods to display custom statuses to your end users.

If you only want to programmatically hide the status:

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

Then the below bit of JQuery can help out. It will only hide that specific status and you can still create new ones that will not be completely hidden by CSS. This can be changed to pure JavaScript as well.

$(window).load(function () {
      var $statusMessages = $('.ms-status-status'),
          $statusMessageBody = $statusMessages.find('.ms-status-body'),
          statusTextToHide = 'The current page has been customized from its template. Revert to template.';

        $.each($statusMessageBody, function (idx, elm) {
            var statusMessageText = elm.innerText;

            if (statusMessageText === statusTextToHide) {
                $('span.ms-status-body').eq(idx)
                    .closest('span.ms-status-status')
                    .addClass('ms-hidden');
            }
        });
    });

Instead of window, you could wait for another element on the page to load. This is just an example. However window was used because SharePoint does not load the "Revert to template" status until atleast the body has been loaded.

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.