Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In my portal I am running a custom master page. I have an issue, however, that the Items and List tabs don't show (even for admin) until I click in an existing list, in which case the ribbon opens.

enter image description here

Where can I make a change that will allow those tabs to show by default if the user has access? What can I look for in the masterpage code?

I found this, where it tells how to remove ribbon controls, but it's not what I'm looking for.


[update]

THE REAL ISSUE

(it's not a custom masterpage issue, so I've edited my title to reflect the true problem)

On a page where you have a custom list, edit the page and insert a second webpart (in my case, it is a CEWP). Now the "Page" tab disappears and doesn't appear unless you click in the list somewhere.

I've installed Service Pack 2 for Sharepoint Server 2010, but it doesn't fix the problem.

So, can anyone reproduce this problem? I've done it now on both my dev machine and in production, and am ready for a solution! Any clue or comment would be great (even an upvote on my question would be rather nice).

share|improve this question
    
Can you please show us a screenshot of this? –  Daniel Ziga Jul 25 '13 at 14:27
    
Ah, the problem is caused if I edit the page that contains a list. When I add a webpart, the "Page" tab disappears. –  BGM Jul 25 '13 at 16:25

3 Answers 3

up vote 3 down vote accepted

Apparently, this is a common problem (I'm surprised that nobody already had a custom solution).

Apparently, this is what causes the problem:

When you add a web part to the standard list views, the page is no longer classified as a list view page, but instead it is classed as an application page.

Katrina over on Stack Exchange posted this solution.

    setTimeout(function() {
    var elem = document.getElementById("MSOZoneCell_WebPartWPQ2");
       if(elem != null) {
            var dummyevent = new Array();
            dummyevent["target"] = elem;
            dummyevent["srcElement"] = elem;
            WpClick(dummyevent);
            _ribbonStartInit("Ribbon.Browse", true);  //set the Browse button as default
        }
    }, 2000);

This method will display the tabs above the ribbon, but the problem is that if you click on the page anywhere besides the ribbon itself or in the list, then the tabs disappear again, so it's not perfect, but it is sort of a workaround.

I tried the above function without the timeout, and with _spBodyOnLoadFunctionNames.push(whatfunction); instead, and it seemed to work fine except that the ribbon is quickly opened and close on page load.

share|improve this answer

Use the designer and put the code in the Content PlaceHolderAdditionalPageHead

@Colbs on StackExchange: Question on StackExchange

share|improve this answer

The current view you are in has only become corrupted. If you access the list settings via site content, delete and recreate the view, the tabs will reappear. I have tested this out in SP 2013.

share|improve this answer
    
This is not true. It is a bug and I have outlined it in my own answer. Adding a webpart to a page that contains a list does not corrupt the view. –  BGM Jul 11 at 0:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.