Tuesday, 22 March 2011

Error message when you try to edit an Office document in a document library: "'Edit Document' requires a Windows SharePoint Services-compatible application"

Had an email from a colleague about a user having the  'Edit Document' requires a Windows SharePoint Services-compatible application error tryign to open and Excel file from sharepoint 2010.  Below is my response (names and some other details have been removed to protect the guilty and maintain confidentiality):
we had something similar last year, but bear in mind that our Sharepoint site is 2007 rather than 2010.  Solution was to install and enable the Sharepoint support addon for IE.  For more details see Microsoft Knowledgebase article 833714 (http://support.microsoft.com/kb/833714/en-gb),

I did a bit of research from home last night.  There are a few different possible causes:
  • MS Office is either not installed or is a broken install (typically the person installing decided to leave some things out or some parts of the install were removed to free up space or resolve an issue)
  • Trying to use a browser other than IE (e.g. Firefox, Safari or Chrome) to access Sharepoint (there is a plugin for Firefox).  I note from the screen shot that XXXX is using Firefox.
  • The sharepoint site is not a trusted site in IE.
  • Using IE 9 Release Candidate (i.e. post-Beta, ironically the Beta worked but one of the fixes when Microsoft moved it from Beta to RC broke sharepoint integration)
  • Using IE as an embedded browser in [Mail Client] (depending on your settings if you click a link in [Mail Client] it either opens a separate browser window or opens the browser in a tab in [Mail Client], this latter causes a whole heap of problems so people should really set [Mail Client] to open the browser in a new window)

As XXXX is using Firefox I'd recommend she try again in IE, hopefully that will resolve the problem.

It appears (http://msdn.microsoft.com/en-us/library/ff407576.aspx) that the Sharepoint 2010 Firefox plug in part of Office 2010 so to use Firefox XXXX will need to install Office 2010.

If XXXX still cannot open the file after switching to IE I'd recommend:
  • Check which version of IE she is using, if it's 9 downgrade to 8  or 6
  • Check that the sharepoint site is in the trusted sites list
  • Check if she can open other files and if other people can open that file (rule out it being a problem with that file)
  • If all else fails, remove and re-install office.  Do a complete install to eliminate the chance that it's a problem with a vital component being left out.

Monday, 7 March 2011

SPD 2007 won't open file but IE will, file has grown massively

We had a problem where a page would display OK in IE but if we tried to open it in Sharepoint Designer (SPD) for editing we had an error message.  We also noticed that the size had grown from a few hundred Kb to over 10Mb.  Turns out what had happened is the last time it was saved SPD had added thousands of 'blank' lines.  Apparently this is a known bug but unresolved.

The solution is to open the file as a text file (which SPD will do) and remove all the blank lines.  Note that few of the lines are truly blank (i.e., just a \n) but often have multiple tab characters in them so a blank line removal function probably will not work.  We found the only way to remove them reliably was to do so manually.

Friday, 24 December 2010

Setting permissions on a folder differently to the document library that contains it.

Had a support call come in that someone had lost access to a document library.  Turned out that what had happened was that one of my colleagues had been asked to make a folder in the document library 'secure', accessible only to a restricted group of people.  What he had done was to edit the permissions for the whole document library.

This request is actually pretty unusual for the sites we're running, We have been asked for 'secure' document libraries before but not to 'secure' a folder within a document library.

Securing a document library is done by selecting "Document Library Settings" from the Settings menu when in the Document Library then Manage Permissions  from the settings page that appears.

To do so for a folder first navigate to the parent folder of the folder you want to secure, so if the folder is DocLib\Parent\Child you would navigate to DocLib\Parent.  OPenh the Edit menu for the folder you wish to secure and select Manage Permissions.  This will open the permissions page for the folder.  Unless this folder has previously had it's permissions edited the only available menu will be Actiions.  You will need to open the Action menu and select Edit Permissions as it will be inheriting it's permissions from the parent folder.  This will cause the New menu to appear and will break the link between the permissions for the parent folder and those for this folder.  You can then add and remove users and groups via athe New and Actions menus.  If you change you mind you can also choose to return to inheriting the permissions from the parent folder, from the Actions menu.

Thursday, 23 December 2010

To upgrade or not upgrade

Our main site right now is on SharePoint 2007 (WSS 3.0), no MOSS or other fun stuff.  At some point it will move to SharePoint 2010.  There has been a suggestion that we do that in the next couple of months.  Our concern is that we suspect that a number of our custom developments might not survive the migration, there are somethings we can do with ease on SharePoint 2007 that simply fail if we try to do them on 2010, for example graphical alerters in place of numeric fields.  Given the number of bespoke developments we have migrating could be a very painful experience and we don't have the luxury of downtime, the sites have to be available.

I did find a forum thread on LinkedIn that discusses the move.  It seems that there's a tool (STSADM) that will pick up most of the problems you're likely to face.

The thing is, most of the sites in our site collection (including the ones with the most bespoke development) will be getting archived in March/April/May 2011.  If we wait until after this has been done there will be a lot less to go wrong and to fix.  I have recommended that we wait until then.  Yes, 2007 is very out of date but we do not currently have any problems that would be fixed by going to 2010 or a business need for any features added in 2010.  We do have a 2010 site so if a new site came along we could build that on 2010 and if a site developed a need to move to 2010 we could transfer just that site over.

Thursday, 9 December 2010

Displaying Server Parameters

My colleague discovered how to display a server variable (e.g. the logged on user) on a page:
  1. Insert a field from any list as a single item dataview, doesn't matter which list or which field, into your page.  We'll say you're using 'Title'
  2. Create a Parameter on that view of Parameter Type 'Server Variable' and set the Server Variable Name to the name of the variable you want to use (e.g. LOGON_VARIABLE for the username of the logged on user.
  3. In the page select the dataview you created then go to the Code view (or code pane in Split view).  look for a line that contains an at symbgol followd by the name of the field you chose.  If you used the title field it would look something like:
    <xsl:value-of select="@Title" />
  4. Replace the @ with a $ and the field name with the name of the parameter.  If the parameter name is Param1 the line will now look like:
    <xsl:value-of select="$Param1" />
  5. Save the page and view it in your browser, it should show your username.

Wednesday, 17 November 2010

f#

Attended a presentation on Microsoft's new programming laguage, F# (pronounced Eff-Sharp, not Eff-Hash as some of my friends thought).  It's decsribed as like a better form of C# as it's Functional rather than Imperitive and doesn't have anywhere near the amount of 'boiler plate' that you need if you're writing code in C#/Java/C++/C.  As you can write code to add dunctionality to SharePoint in C# I asked if F# could be used for that as well, the almost ksh like way you can pipe things in F# seemed ideal for processing data entities such as list items in SharePoint so I couldn't see why not.  The guy from Microsoft didn't know.