8

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).

2
  • Can you please show us a screenshot of this?
    – user2536
    Jul 25, 2013 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.
    – bgmCoder
    Jul 25, 2013 at 16:25

5 Answers 5

9

This is not a bug. If you have more than one web part on a page then you must click the one you want the ribbon for.

2
  • This should be the accepted answer. I tried everything in the world only to realize that i just need to select the right web part. Click on any item on the list to get the ribbons. Apr 2, 2016 at 17:48
  • Agreed. This is the correct answer, since it's by design.
    – Omegacron
    Jun 10, 2016 at 21:01
7

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.

2

Use the designer and put the code in the Content PlaceHolderAdditionalPageHead

@Colbs on StackExchange: Question on StackExchange

0

I had the same issue with SharePoint 2013, Clicked on the Return to Classic SharePoint on the Bottom Left and was able to view the Ribbon.

-1

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.

1
  • 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.
    – bgmCoder
    Jul 11, 2014 at 0:17

Your Answer

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

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