Sunday, January 30, 2011

Calendar not available in Publishing Portal?

Issues Details:

I am creating a Web Content Management System, so I am using the PublishingPortal for the Web App. When I hit create, I can create a

1. Libraries (Document Library, Picture Library)
2. Tracking (Tasks),
3. Custom Lists (Custom List, Import Spreadsheet),
4. Web Pages (Basic Page, Web Part Page, Sites and Workspaces, Publishing Page)

But I cannot see either calendar/links/Announcments. How to add a calendar/links/announcements to a publishing portal?

Solution Details

1 . Go to "Site Actions --> Site Settings --> Click Modified All Site Settings"
2. Go and Click " Site Features under Site Administration"
3. Once Activate "Team Collaboration Lists" feature issue fixed.

Friday, January 21, 2011

Shrink Database LDF & MDF Files

Shrink Database LDF File

USE 'ContentDatabase';
GO
BACKUP LOG 'ContentDatabase' WITH TRUNCATE_ONLY;
GO
DBCC SHRINKFILE ('ContentDatabase_log', 100);


Shrink Database MDF File

USE 'ContentDatabase';
GO
SP_HELPDB 'ContentDatabase';
GO
EXEC sp_spaceused @updateusage = 'true';
GO
DBCC SHRINKFILE ('ContentDatabase', 100)
GO
EXEC sp_spaceused

Tuesday, January 18, 2011

Quick A to Z of SharePoint Logs

SharePoint generates multiple log types.

Logs in SharePoint require three basic steps like all other logs: Logging, Processing and Reporting.

The logging can take place to file locations on front-end servers or to the associated content databases for each Site Collections (including SSP).
Processing happens via Timer Jobs on the front end servers and the SSP server (if different) using the Timer Service at various configurable intervals.
Reports are available via the web browser at Site, Site Collection, Web Application or Farm Level.

MOM packs are available both for WSS 3.0 and MOSS 2007 and help administrators in maintaining the entire farm from a centrel location.

All file based logs can be read by text editors and can be parsed by using popular log parsing tools (Log Parser 2.2 from Microsoft or Funnel Web). It will also be a good idea to read the IIS Logs which are generally saved at (System Drive):\WINDOWS\system32\LogFiles

a) Diagnostics Logs
· Event Throttling Logs – These end up going to the Windows Event Log and can be viewed in the Event Viewer. They show Errors and Warnings.
· Trace Logs – These show detailed line by line tracing infomration emitted during a web request or service execution. They end up being stored at a known location on the front-end server. Default Location: (System Drive):\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\

b) Audit Logs – They end up in the associated Content Database tables and can be viewed at Site Collection Level as well as Site Level using the web browser. WSS 3.0 and MOSS 2007 use different pages to show Audit Log Reports.

c) Usage Logs – They get stored locally on the front-end servers and get processed both locally and at farm level via SSP (this is based on the setup as I understand the results from the local processing are merged by SSP) and can be viewed at both the Site Level and Site Collection Level. Default Location: (System Drive):\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Logs

d) Search\Query Logs – These are saved in the associated SSP database but can be viewed at SSP level via the Web Browser and in MOSS at Site Collection Level by going to the settings page.

e) Information Management Logs – Stored in the associated Content Database and can be can be viewed at the Site Collection Level.

f) Content and Structure Logs – This option is only available after one enables the publication feature. This store is saved in the Content Database associated with the Site Collection and can be viewed at Site Collection level by going to the settings page.

Monday, January 17, 2011

Disable OK button in SharePoint using jQuery

When you want to disable OK button in NewForm, Editform of list or document library in SharePoint, you can achieve this with the help of jQuery and it helps a lot. Let us say that you have some requirement like if status is suspended then nobody should be allowed to make any changes in the status field.

Let us add complexity to this. We have attached a workflow that triggers on update. Now the problem with SharePoint is even though nothing is updated, then also it triggers the workflow. So if you do not disable OK button and you go and click on edit item. And then when you do not update anything, click on OK. Boom...workflow triggers. Man…I don’t like this.

Here comes jQuery to save us. Disable the status and disable OK button. That will solve the purpose.

What do you need to do? Well, I have created dummy list to demonstrate this.I have few fields and one of them is status.

Statuses are New, In Progress, Archived and suspended.When the status is suspended, I do not want to allow any of the users to change the status and also there is workflow attached to this list which triggers if we update any item. Workflow is attached from the SharePoint designer. Hence we are even not writing a code in event handler to check for the item has changed or not in ItemAdding event.

So write down this jQuery in content editor web part. Just add CEWP on top with appending &toolpaneview=2 to the URL.Add following code to the content editor web part. If you observe we have taken reference of jquery from shared document. You can download the jQuery and then give href to the document library path. What we have done in this jQuery is simply finding all drop downs and then checking its value. If it’s suspended, then we are again checking button OK by its class and once found, we are disabling the button. Hummm…Easy ha? Yes it is.




See the Results

Wednesday, January 12, 2011

The filtering process could not be initialized. Verify that the file extension is a known type and is correct

Do you have pptx or any other files with broken links on any of your SharePoint web sites? If that is the case then SharePoint 2007 and Search 2008 will NOT crawl the file at all and it will throw the following error:

“The filtering process could not be initialized. Verify that the file extension is a known type and is correct”

To fix this issue you will need to install Microsoft Office 2010 Filter Packs. Do not worry if you are not using or installed SharePoint 2010 or any Office product 2010. This filter pack justs adds a bunch of dll files that will fix the problem. You only need to install the Microsoft 2010 Filter Packs on your INDEX server.

Link to Microsoft 2010 Filter Packs:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5cd4dcd7-d3e6-4970-875e-aba93459fbee&displaylang=en