Archive for the ‘Fix’ category

User Unable to Create Page (User has Full Control)

April 30, 2009

Ran into an odd little issue this morning where my users in a publishing site could not create new pages. The reason they couldn’t create a new page turned out to be because they did not have read rights on the masterpage gallery.

The symptoms are basically access denied pages when any user with full control or design rights chooses to create a page in a publishing site. When they create the page they get the typical “Error: Access Denied” page and can either sign in as another user or request access.

Hope this helps save someone a bit of time troubleshooting this specific issue in the future,
Richard Harbridge

Renaming Root “Title” Site Column – Powershell Example

February 12, 2009

The other day I had to correct a friends SharePoint site column and feel like tossing out a quick blog about it. Sometimes what happens is you begin digging into a content type, go a bit too far and modify the wrong site column, not the inherited one, but the actual title column used for an entire site collection.

Ok, so just change it back right? Unfortunately that’s when you will run into the message: “The column name that you entered is already in use or reserved.”

Microsoft has a nice support article on it here: http://support.microsoft.com/kb/923589 and many SharePoint community members have blogged about workarounds such as Bob Mixon (http://masteringsharepoint.com/blogs/bobmixon/archive/2008/08/22/have-you-ever-changed-the-top-level-site-title-site-column.aspx). Bob does a great job of outlining a Powershell script here that can be easily used to update the column.

Here is the script Bob provides. I have tweaked it to ensure the web and site objects are properly disposed of (http://blogs.msdn.com/sharepoint/archive/2009/02/11/sharepoint-and-powershell-knowledge.aspx).

[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)
#Replace the siteurl with your targeted site collection url.
$siteurl = “URL of top-level site”

$spsite=new-object Microsoft.SharePoint.SPSite($siteurl)
$spweb=$spsite.OpenWeb()
$spfield=$spweb.Fields.GetFieldByInternalName(“Title”)
$spfield.Title = “Title”
$spfield.Update()
$spweb.Dispose()
$spsite.Dispose()

PowerShell for Windows 2003 SP1 can be downloaded from here:
X86 – http://go.microsoft.com/fwlink/?LinkID=75790&clcid=0x09
X64 – http://go.microsoft.com/fwlink/?LinkID=75791&clcid=0x09

Hope this helps someone,
Richard Harbridge

Retrieve Any Fields for InfoPath from Another SharePoint List

January 15, 2009

So I have used owssvr.dll before to export excel documents of lists etc on the fly but the other day when I was exploring InfoPath workarounds for SharePoint lists (related to issues with Managed Paths and a bunch of other things) I found out that there are even more functions to the wonderful URL protocol!

Let me explain.

Way back in the 2001 SharePoint days the OWSSVR.dll was extremely important to remotely invoke functions against SharePoint data. In 2003, and now 2007 it’s not as important, but still used by applications like SharePoint Designer and InfoPath.

What I am going to describe is how I used it to resolve a specific InfoPath need, but you can also use it for XML webparts, or any other systems that can interpret XML 🙂

In InfoPath if you try and connect to SharePoint lists when using Managed Paths (This may be resolved in SP2) InfoPath will give you errors and all sorts of trouble. The ‘workaround’ for this is to simply reference the SharePoint lists using owssvr.dll and set it up in InfoPath as a data connection receiving XML (since that’s what the address we use will return).

The method is outlined in pretty good detail in this article: http://www.sharepoint-tips.com/2007/01/infopath-form-services-implementing.html (which is also great if you want to implement a master detail relationship *wink wink*).

We use a URL similar to the one shown below:

http://portal/_vti_bin/owssvr.dll?Cmd=Display&List=GUID&View=GUID&XMLDATA=TRUE

This is specified as the source in a new data connection which retrieves data. Complete the data connection wizard (after adding the url) and you should now have the SharePoint data available for use in the InfoPath form (this can be used in expression controls, drop downs and other fun InfoPath controls).

Some Quick Notes:

Using the above url line will cause an XML file of the list’s contents to be returned.

To retrieve the list GUID or the view GUID for use in the url command simply navigate to the list of choice, select list settings and in the top URL bar will be the List GUID (converted for web etc) and if you scroll down to where views are listed in list settings you can click on any specific view and you will get the view GUID showing in the top URL bar (again converted).

If you are having trouble transforming the values of the GUID follow these basic steps:

  1. Copy the URL into notepad.
  2. Replace all “%7B” with {
  3. Replace all “%2D” with –
  4. Replace all “%7D” with }

That should make it easy to copy and paste the GUID’s into the URL properties of the owssvr.dll address. 🙂

The OWSSVR.dll can also do more than what I have described here and I highly recommend being aware of it for use in third party applications and for quick tricks: http://msdn.microsoft.com/en-us/library/ms478653.aspx

Hope this helps someone else,
Richard Harbridge

December Cumulative Update for SharePoint

December 18, 2008

For those administrators out there please read over this new annoucement entry on the SharePoint blog: http://blogs.msdn.com/sharepoint/archive/2008/12/17/announcing-december-cumulative-update-for-office-sharepoint-server-2007-and-windows-sharepoint-services-3-0.aspx

Keep in mind these are only to fix the issues if you have them, if not I would recommend waiting until SP2.

Not sure what the cumulative updates are? Here is my previous post on it https://sharepointkb.wordpress.com/2008/09/30/cumulitive-updates-for-sharepoint-2007/ or check out Microsoft’s initial announcement on it: http://blogs.msdn.com/sharepoint/archive/2008/09/29/announcing-august-cumulative-update-for-office-sharepoint-server-2007-and-windows-sharepoint-services-3-0.aspx

Oh and before installing any updates to SharePoint or any Microsoft product keep in mind how their lifecycle/support system works. http://support.microsoft.com/lifecycle/ As this can impact you if you experience issues as a result of an update like this.

Hope this helps someone,
Richard Harbridge

Name.dll Prompt in IE 7 Fix (Feature, and Easy Deployment)

December 1, 2008

Great news! Ever receive that name.dll prompt on a SharePoint site of yours when viewing in IE 7?

This issue occurs if the Name ActiveX control (Name.dll) is not added to the list of preapproved controls in Internet Explorer 7. The Name ActiveX control is included in the 2007 Microsoft Office system. http://support.microsoft.com/default.aspx/kb/931509

The way to fix it? They have 3 ways, add the site to trusted sites, change the registry, or modify each master page.

Typically option 3 is most appealing. (Quick note, make sure you comment all function lines in their example, it is wrong and if you don’t will result in a js error.) However it has a significant drawback. Imagine how much effort it would take to update hundreds of site collections with many customized master pages?

The good news is that just a short time ago Larry J. Riemann wrote a terrific feature for codeplex based off of Randy Drisgill’s workaround (in response to issues people were having): http://blog.drisgill.com/2007/09/fixing-namedll-activex-problem-mossman.html

The feature (which makes me happy) is located here: http://www.codeplex.com/SPAXO

What is great about this feature is that it is scoped to the web application level so the number of site collections, and sub sites don’t matter. What’s more the way it’s designed should not be effected by any customizations or the number of master pages. Making it a very appealing resolution.

Find out more about the codeplex activex override at Larry’s blog here: http://lriemann.blogspot.com/2008/11/sharepoint-activex-override-module.html

Warning: Through testing this feature I have noticed it causes critical errors when using InfoPath Form Services.

Thank you Randy and Larry we all appreciate it,
Richard Harbridge

Calculated Column Dynamically Updated (When using [Today])

October 3, 2008

Today I was asked a fairly common question that everyone who uses calculated columns eventually runs into. “How do you get a column to calculate automatically when using a reference for a date, or something that dynamically changes like [Today]?” Out of the box this isn’t available because the calculated columns ONLY calculate when an item is updated.

The solution is simple, you write a custom solution that updates all items as desired. So this could be something that runs daily or every time you view the data (using a dashboard). You could even write the code so it adds and removes the column instead of iterating through the items. Do some performance testing to see which is faster in your case.

A terrific Article was posted by Dink that answers exactly how to do it too with free samples: http://www.sharepointblogs.com/dez/archive/2008/07/31/dynamically-updating-a-sharepoint-calculated-column-containing-a-quot-today-quot-reference.aspx

There is also a post here by Chris where he uses the DataView and JavaScript: http://pathtosharepoint.wordpress.com/2008/08/25/a-countdown-for-tasks-lists/

Hopefully this helps someone out,
Richard Harbridge

Cumulitive Updates for SharePoint 2007

September 30, 2008

The Office Team has made an announcement on the SharePoint msdn blog explaining the new methodology that will be used for cumulative updating (or hotfix resolution) here: http://blogs.msdn.com/sharepoint/archive/2008/09/29/announcing-august-cumulative-update-for-office-sharepoint-server-2007-and-windows-sharepoint-services-3-0.aspx

Keep in mind that this is only for if you are experiencing issues that are resolved by these hotfixes and that SP2 for MOSS will include this cumulative update (and any up until the SP2 date).

There should be a new update every two months (cumulative) so keep your eyes posted and make sure to read over the hotfixes to see if any apply to some issues you may be experiencing.

Best of luck,
Richard

Publishing Infrastucture gives Access Denied

August 20, 2008

This happens more often then I would like, but sometimes you receive an access denied message when trying to turn on the publishing infrastructure feature of SharePoint. This is related to the installation/configuration of the web applications and SharePoint user accounts.

Simple solution? Just use the stsadm command “stsadm -o activatefeature -name PublishingResources -url <YOURURL>” and it will activate the feature for you.

Other solutions could be adding the user account being used in the application pool to the WSS_ADMIN_WPG group on that local machine. This would resolve it and remove the permissions issue.

Anyways just wanted to note this so I wouldn’t forget and maybe it can help someone,
Richard Harbridge