Friday, March 20, 2009

Hiding the List Menu options (Views, context menu items)

Wrap up the following Javascript code into the content editor webpart!
-----------------------------------------------------------------------

hideListViewToolbarItems("Edit in Datasheet", "export to Spreadsheet",
"view rss feed","settings:create view");
function hideListViewToolbarItems()
{
var menuItem;
var menuItemName;
var menuItemIndex=-1;
var menuItemNames=new Array("edit in datasheet",
"open with windows explorer",
"connect to outlook",'export to spreadsheet','view rss feed','alert me'
,"create column","settings:create view","list settings",
"document library settings","explorer view","all documents",
"all items","modify this view",
"view:create view","new document",
"new item","new folder","upload document",
"upload multiple documents");
var menuItems = new Array("EditInGridButton",
"OpenInExplorer","OfflineButton",
"ExportToSpreadsheet","ViewRSS",
"SubscribeButton","AddColumn",
"AddView","ListSettings","ListSettings",
"View1","DefaultView",
"DefaultView","ModifyView","CreateView",
"New0","New0",
"NewFolder","Upload","MultipleUpload");
var allMenuItems = document.getElementsByTagName('ie:menuitem');
for(var i = 0; i < hideListViewToolbarItems.arguments.length; i++ )
{
menuItemName= hideListViewToolbarItems.arguments[i].toLowerCase();
for (j=0; j < menuItemNames.length; j++)
{
if(menuItemNames[j]==menuItemName)
{
menuItemIndex = j;
break;
}
}
menuItem=menuItems[menuItemIndex];

for (var l = 0; l < allMenuItems.length; l++)
{
if(menuItemName.indexOf(":")!=-1)
{
menuItemName = menuItemName.split(":")[1];
}
if (allMenuItems[l].id.indexOf(menuItem)!=-1
&& allMenuItems[l].text.toLowerCase() == menuItemName)
{
// For FireFox Compatibility
var parentNodeOfMenuItem = allMenuItems[l].parentNode;
parentNodeOfMenuItem.removeChild(allMenuItems[l]);
break;
}
}
}
}

Ref: Ayman's blogspot

Monday, March 16, 2009

insufficient memory to continue the execution of the program

While clicking on the 'Search settings' page, you get the following error:
'insufficient memory to continue the execution of the program'
Fix:
  1. Perform the below steps on every WFE in the farm:
    net stop WSSTimerV3
    net start WSSTimerV3
  2. If you are not through the first step, kill the MS Search.exe on each WFE
    Task Manager -> Processes -> MSSearch.exe -> right click -> end the process
    (If you cant see the process in the list, check the 'show processes from all users')
  3. Try flushing the local mso config cache to avoid this error throwing often.

Tuesday, March 3, 2009

Javascript Error while editing the Content Editor Webpart

This error is due to the JavaScript plug-ins (HtmlEditor.js or BFORM.js) files in the 1033 folder on the 12 hive. When you add the SP1, it did not update these two files to compliance with .js codes in 'content editor' web parts. These kind of issues occur when you miss the installation sequence, i.e. SP1 was added after the java script plug-ins. Thus, unable to control the files later.

Steps to recover:
  1. If you have more than one severs running in the form, go to the server in the form, where the Content editor popups are working fine.
  2. Go to: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033
  3. Replace the HtmlEditor.js , BFORM.js and OWS.js with the healthy server's files.

While trying to edit(edit->modify shared webpart-> rich text editor) a Content Editor Webpart, Rich text editor window will popup.
Due to the popup blocker flags on the browsers, this popup window will be blocked. To avoid this, Microsoft added the fix within the servive packs that will go and edit the javascript plug-ins on the MOSS 2007 . This update goes with the installation of the WSS SP1.