For the SP2013 I used the following javascript to show messages:

var msId = SP.UI.Status.addStatus('Message:', 'A message');
SP.UI.Status.setStatusPriColor(msId, 'red');

I migrated (and upgraded to 2016) the farm on a test server where the posted code does not work. msId is always null. This due to the following code in init.js:

function addStatus(g, h, e, f) {
    var a = document.getElementById("pageStatusBar");
    if (a != null ) {
        a.setAttribute("aria-live", "polite");
        a.setAttribute("aria-relevant", "all");
        var b = _createStatusMarkup(g, h, true, f);
        if (!e)
        else {
            var c = a.getElementsByTagName("SPAN")
              , d = c.length > 0 ? c[0] : null ;
            if (d != null )
                a.insertBefore(b, d);
        if (a.childNodes.length == 1) {
            StatusIdWithTopPriority = b.id;
            StatusColorWithTopPriority = 1
        a.style.display = "block";
        return b.id
    return null

This means that the element pageStatusBar does not exist...

Comparing oslo.html and seattle.html I found the difference, one has it the other does not. The point is that the two files of the old 2013 and the new 2016 match, so how it is possible that the end UI is different?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.