Posts

Showing posts with the label sharepoint 2007

SharePoint 2007 | Clear Timer Job Status Entries

To clear timer job entries under C.A., Operations, "Timer Job Status": Enter SQL Server Management Studio and navigate to SharePoint_Config, TimerRunningJobs Table or run delete from [SharePoint_Config].[dbo].[TimerRunningJobs] where [JobTitle]= 'jobname' and [Status] = 3 http://www.arboundy.com/2011/06/sharepoint-2007-clear-timer-job-status-entries/

SharePoint 2007 | Reset Service Accounts

Solving user account password issues under SharePoint 2007 http://support.microsoft.com/kb/934838

Windows SharePoint Services | Search Corrupt

Problem: WSS Search Corrupt: "Não foi possível inicializar o índice de conteúdos em Search. Erro O índice de conteúdos está danificado. 0xc0041800.Componente: a6aee81d-3681-4f22-bf00-a182c5625f4f" or "The search index is currupted" Solution: Make a full crawl, erasing the current Search DB - Open C.A., services on server, stop Search Helper Service - Start (services.msc) Search Service on the Server - Open Search Management (click Search Helper on the C.A.'s Operations) - Chose a New Search DB name - Start the Search Helper Service http://support.microsoft.com/kb/943605

WSS3 | MOSS 2007 Where's my disc space?

Today a got a warning from the OS "You are running out of disc space!" What? 160GB is not enough anymore? After removing some stuff, like temporary files, cleaning the disc, and removing unecessary apps and installations, I decided to look for large files above 150MB and turns out there were about 60GB in SharePoint log files. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS) I did find some issues. SharePoint was trying to use Single Sign-On, while SSO wasn't enable on the farm. Well, since I don't really need logs I just stopped and disabled the WSS Tracing Service. At least now I don't have to worry about keeping an eye on that folder every once and a while.

WSS3/MOSS 2007 upgrade already running stsadm issue

Problem: If an upgrade is started using the stsadm command line tool, you will not able to start another upgrade process from the user interface. If you try to start a second instance of upgrade, the following error message will be displayed: "Unable to upgrade SharePoint Products and Technologies because an upgrade is already in progress. Upgrade progress can be monitored using the Central Administration Web Application or by monitoring the upgrade log on server "X"." http://www.blogger.com/img/blank.gif "X" is the name of the server that initiated the upgrade process. Solution: stsadm -o setproperty -pn command-line-upgrade-running -pv No http://technet.microsoft.com/en-us/library/cc288357%28office.12%29.aspx

stsadm upgrade fails with too new exception

[ERROR] [08-04-2011 11:05:54]: Upgrade object too new (build version = 12.0.6539.5000, schema version = 12.0.0.0). Current server (build version = 12.0.6425.1000, schema version = 12.0.0.0). After trying almost everything, I managed to get the command working by changing, the... registry! HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0 Key: BuildVersion Value 12.0.6425.1000 To the actual installed version located in C.A. Operations, Servers in Farm (12.0.6554.5000) then it worked! stsadm –o upgrade –inplace –forceupgrade Latest WSS Cummulative Update (12.0.6554.5000) http://support.microsoft.com/kb/2475886 Latest MOSS Cummulative Update (12.0.6554.5000) http://support.microsoft.com/kb/2475885 WSS/MOSS VERSIONS http://insomniacgeek.com/how-to-determine-the-installed-sharepoint-version/ Source http://vandanarathore.blogspot.com/2009/06/b2b-upgrade-fails-with-error-upgrade.html

Errors Adding a Server to the Farm - Invalid List Template (0x8102007B)

Problem: SharePoint Configuration wizard throws Invalid List Template while adding a server to a farm Solution: Check servers for missing XML templates from one another. Make sure all servers have all language folders: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\1033\XML C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\2070\XML http://www.richardawilson.com/2010/09/erors-adding-server-to-farm-invalid.html

SharePoint Server Issues

Q: "Error 6. The handle is invalid" When starting WSS Serch Service A: Change login account to local service http://consultingblogs.emc.com/johnrayner/archive/2007/02/16/MOSS_3A00_-Error-_2200_The-handle-is-invalid_2200_-when-starting-Windows-SharePoint-Services-_2800_WSS_2900_-Search-service.aspx Q: SharePoint_Config log is too full(SharePoint_Config_log.LDF) A: Backup file and Reset Log to specified MBs SQL SQUERY: BACKUP LOG [Sharepoint_Config] TO DISK='C:\configLogBackup.bak' [Execute] BACKUP LOG [Sharepoint_Config] WITH TRUNCATE_ONLY USE [SharePoint_Config] [Execute] DBCC SHRINKFILE (N'SharePoint_Config_log' , 50) [Execute] http://www.sharepointboris.net/2008/10/sharepoint-config-database-log-file-too-big-reduce-it/ Q: MSSQLSERVER NT AUTHORITY\SYSTEM Event Failure every Minute A: Remove Jobs from non-existing databases http://www.sharepointassist.com/2009/04/19/login-failed-for-user-nt-authoritysystem-client/ Q: Server error: http://go.microsoft.com/fwlin...

SharePoint | Find Site Template Name and ID

WSS3 stsadm.exe -o enumallwebs -databasename [WSS_Content] WSS_Content is Content Database name, found in C.A., Application Management, Content databases WSS4 In 2010 this can be done with powershell: get-spweb http://contoso | select WebTemplate get-spweb http://contoso | select WebTemplateID

SharePoint | Conditionally Aprove List Item When Content Aproval is Enabled

We can programatically aprove an item with item.Aprove("my comment"); the thing is, this will end up in an exception when Content Aproval is not enabled for a list (cheking in is enough to make the item available). I tried using item.ModerationInformation.Status but it turns out this attribute isn't even available for lists without content aproval. so I end up with this: if (myfile.Item.ModerationInformation != null) { myfile.Approve(""); }

MOSS | Failed to extract the cab file in the solution.

Issue: STSADM or SharePoint Solution installer trows "Failed to extract the cab file in the solution." When trying to install wsp package. Solution: Look for duplicate files in manifest.xml or illegal characters (~, ^) in feature.xml. http://geekswithblogs.net/kjones/archive/2010/02/09/137887.aspx

SharePoint | Get currently active master page [2010/2007]

** SHAREPOINT 2010 / POWERSHELL *** GET: get-spweb -id http://sharepointbind/new/basicsearch | select CustomMasterUrl SET: (get-spweb -id http://sharepointbind/new/basicsearch).MasterUrl = "_catalogs/masterpage/v4.master" *** WSS3/MOSS 2007 / STSADM *** Get my version of msdn's package, repackaged for fixed "type null" issue and with SharePoint solution installer attached for faster installation. Just install and then run "stsadm -o showmaster page -url http://localhost" Download here MSDN CustomPageCommands Link *** Enable/Disable SP2010 Features *** Enable-SPFeature -Identity featurename –url http://yoursiteurl Disable-SPFeature -Identity featurename –url http://yoursiteurl

Cannot activate Publishing Infrastructure feature on MOSS 2007

Today I got this error when trying to activate the publishing infrastructure feature for a new SharePoint 2007 Team Site: "A list, survey, discussion board, or document library cannot have the same name as another list, survey, discussion board, or document library in this Web site. Use your browser’s Back button, and type a new name. at Microsoft.SharePoint.Library.SPRequestInternalClass.CreateList(String bstrWebUrl, String bstrTitle, String bstrDescription, String bstrListUrl, String bstrFeatureId, Int32 lTemplateID, String bstrDocTemplateType, ListQuickLaunchOptions qlOpt) at Microsoft.SharePoint.Library.SPRequest.CreateList(String bstrWebUrl, String bstrTitle, String bstrDescription, String bstrListUrl, String bstrFeatureId, Int32 lTemplateID, String bstrDocTemplateType, ListQuickLaunchOptions qlOpt)" Solution: Turns out erasing the "Style Library" with SharePoint Designer solves it! http://www.cleverworkarounds.com/2007/10/27/sharepoint-branding-part-5-%E...

SharePoint welcome.ascx change PT-PT login message

In SharePoint sites language 2070 (PT-PT), login welcome message is "Bem-vindo a [DOMAIN\USER]" we can change this message with javascript, finding the Menu ID of the link button. _spBodyOnLoadFunctionNames.push("welcomeBemVindo"); function welcomeBemVindo() { var re= new RegExp('_Menu','g') var el = document.getElementsByTagName('a'); for(var i=0;i { if(el[i].id.match(re)) { var content = document.getElementById(el[i].id); content.innerHTML = content.innerHTML.replace("Bem-vindo a", "Bem-vindo"); } } } the id is dynamic, so we have to use a regular expression to get it. usually it is zz8_Menu but it can change for other pages

Installing Windows Media Player Plugin in Server OS

Scenario: - Windows Server Operating System - Using Windows Media Player 10/11 Codec Problem: - Windows Media Player Plugin won't install on other browsers than IE with error: "This package does not support server operating systems". Solution: - Unzip exe, and hex edit the msi file. Or simply download the edited plugin here . Resource: http://arnoutboer.nl/weblog/?p=24

Data View Web Part Filter by URL Field

Scenario: Lets say you have a page with multiple data (say videos) and you want to click (select) the item and open a new page with the item open (video display). This can be done with a Data View Web Part Per Page. Solution: Create a data view web part in the main page that shows all data from the list, filtering and/or sorting the results, and even giving then specific layouts (I usually use Plain List style and then use xslt and css). Here you should create a html link tag with the list item's name as text and URL (FileRef) as href. If you're using a document library, you can use the field directly in the html, <a href="Video.aspx?ID={@ID}" ><xsl:value-of select="@FileLeafRef" /></a> Right now you have a page of queried items and a page that opens with an ID query string On the view page, create a data view web part, customize it, and limit the results to one. Here you must create a new filter, and select "Create a new parameter......

Editing SharePoint Surveys

Problem: Add customized numbers in the SharePoint Survey list's question field Solution: Add question as: "surveyquestionstart 1. surveyquestionend Where's my car dude?" So now what we want to do is add a javascript to the page that changes surveyquestionstart -> to <span class="question"> and surveyquestionend -> to </span> Javascript can be added by the ToolPaneView=2 trick and adding a content editor web part to insert the script; or open the form directly with SharePoint Designer and add the code to the END of the contents in the main place holder. http://www.sharepointkings.com/2009/08/creating-and-working-with-survey-in_7080.html Find the script here Nice trick to edit the form as webpart zone: add ToolPaneView=2 to the new/edit/disp URLs. http://www.sharepointkings.com/2008/05/how-to-edit-list-forms-like-newformaspx.html

PopEndTag was called without a corresponding PushEndTag

I came across this error when overriding the menu class to make SharePoint navigation CSSFriendly. CSSFriendly control adapters from CodePlex are not an option, since control adapters change all navigation controls (horizontal and vertical) for all SharePoint sites and admin zones throughout the given application pool. public class MossMenu:System.Web.UI.WebControls.Menu Method to override: - RenderBeginTag - RenderContens - RenderEndTag After all errors removed and deploying solution, I get: "PopEndTag was called without a corresponding PushEndTag" Solution: The solution is to add the render method so it mentions all methods: protected override void Render(HtmlTextWriter writer) {   if (this.Page != null)   {     this.Page.VerifyRenderingInServerForm(this);   }   if (this.Items.Count > 0)   {     this.RenderBeginTag(writer);     this.RenderContents(writer);    ...

Disable add "Name.dll" request on IE7/8

Add to master page <script type="text/javascript"> function ProcessImn(){} function ProcessImnMarkers(){} </script> http://blog.drisgill.com/2010/02/removing-name-activex-control-warning.html

Feature Scopes, targets, and security handling

Feature Scope (feature attribute) say where the feature will appear, and how activation/deactivation is inherited throughout the sites - Web(subsite) - WebApplication(web application) - Site(site collection) - Farm Note: Farm features do not allow modules DeploymentTarget (manifest.xml assembly attribute) lets us say we either want to give the dll full trust (stuck it in the GAC) or just copy it to the current web application's bin folder. - GlobalAssemblyCache - WebApplication Save Control tagging to web.config lets assemblies execute code on our pages. This definition can, as the previous two ones, be compiled within the wsp package, in the manifest.xml. <Assemblies> <Assembly Location="mydll.dll" DeploymentTarget="GlobalAssemblyCache" > <SafeControls> <SafeControl Assembly="mydll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a3b8628163ff75bc" Namespace="mydll" TypeName="*" Safe=...