The How to: Modify the Ribbon in PWA article in the Project 2010 SDK works for the cases in the article, but in other cases, you can get a JavaScript error when you try to hide some ribbon controls in PWA. For example, if you hide the Zoom and Show/Hide groups in the Project Center ribbon, a JavaScript error occurs while debugging the Visual Studio project, and all of the ribbon controls are disabled on that page. The error occurs only for controls in the Show/Hide group.
Here is the standard Project Center ribbon. The Visual Studio 2010 project that hides the Zoom group and the Show/Hide group is in the attached ProjCenter_Hide2Groups.zip file.
Here is the solution for the Project Center ribbon customization issue - at least with three of my machines, all of which have Internet Explorer 9, with both 32-bit and 64-bit IE. I did not test with IE8. The problems may be solved, or may be different, with future updates or different versions of Internet Explorer.
On my Windows Server 2008 R2 machine, there was an earlier IE9 RC (9.0.8080.16413) build installed. When the ribbon customization feature was deployed, all of the ribbon controls were disabled on the Project Center page. When debugging in IE with F12, the Script tab shows:
SCRIPT5022: Attempting to attach to Id: Ribbon.ContextualTabs.ProjectCenter.Home.ShowHide but this id is not present in the DOM cui.debug.js?rev=seEKIhJXfBClfYcr46fd3w%3D%3D, line 1282 character 13
$3v: function() {ULSpEN:; var $v_0 = $get(this.$6_0); if (!CUI.ScriptUtility.isNullOrUndefined($v_0)) { this.set_$2($v_0); } else { throw Error.create('Attempting to attach to Id: ' + this.$6_0 + ' but this id is not present in the DOM'); } },
I don't have an explanation of why this happens, but the previous steps are what works (on my machines – the famous WOMM test). You might find different issues, depending on your software versions and whether the Sun is having a coronal mass ejection that day. I suspect it is a combination of problems of the Javascript implementation in the Internet Explorer build version (naturally, it couldn't be Project Server's problem!).