If you would like to discuss anything, please contact me via email: Howard.Bayliss@sequence.co.uk
Showing posts with label Troubleshoot. Show all posts
Showing posts with label Troubleshoot. Show all posts

Friday, June 20, 2014

SharePoint Web Part "No item exists at"

I've just started using SharePoint Online (part of Office 365).


I'm creating an Intranet using Publishing Pages. Most of the pages are using the Welcome Links page layout. On some of the pages, I wanted to add a List View Web Part (supplied with SharePoint). I could add these to the page. However, when I selected "Edit Web Part" I saw the following SharePoint error:


No item exists at https://sitename/OpsManagement/Pages/default.aspx?Filter=1&FilterOnly=1&List={7B611D12-3559-4F60-9B6B-265CA420177B}. It may have been deleted or renamed by another user.


After some trial-and-error, I noticed that this issue does not occur if the page is using the Blank Web Part page layout. Note that this page layout does not render the Publishing Image field.


My conclusion is that the issue is caused by a conflict between the Publishing Image field (rendered by the Welcome Links layout) and the List View Web Part.


(Maybe this is due to the new image rendition functionality?)


I've raised a ticket with Microsoft support and will report back any findings.

Update 26/06/2014
Microsoft accepts that this is a bug and is working on a fix. No indication of when this will be resolved. I'll provide another update when it is.

Update 27/06/2014
Just finished a call with Microsoft. It would appear the problem has now been fixed as part of a different ticket.

Wednesday, February 27, 2013

SharePoint "Managed Navigation" visitors

Is your Managed Navigation not showing / hidden? If so read on...

SharePoint 2013 includes Managed Navigation. I used this to setup some basic navigation but found that, when logged-in as a visitor, the navigation disappears.

I came across this page - "Managed navigation not visible to Readers" - which said "navigation nodes which do not have a page will not be shown to Readers".

To implement this fix, for each term (in your Managed Navigation Term set) you can :

  1. On the "NAVIGATION" tab, change the "Navigation Node Type" to "Simple Link" and specify a page url, or
  2. On the same tab, change the "Navigation Node Type" to "Term-Driven Page with Friendy URL" and then, on the "TERM-DRIVEN PAGES" tab, change the target page for the term to a page url.

Thursday, November 3, 2011

"This solution contains no resources scoped for a Web application"

I created a SharePoint Solution that contained a single Feature. The Feature had a Receiver which is used to make web.config modifications.

I wanted to target these modifications at specific SharePoint web applications. However, when I ran the following PowerShell command, I got the message: "This solution contains no resources scoped for a Web application".

Install-SPSolution –Identity <WSP NAME>.wsp –WebApplication http://<TARGET APP URL> -GACDeployment -Force

Other people suggest not including the target web application url. I don't want to do this as it will affect all web applications, not just our own.

The workaround I used was to include the Solution assembly within its own package, and mark it as a "SafeControl".

I realise that this not ideal. Do you have a better solution?

The steps I followed were:

1) Open the Project Properties for the Solution, and set "Include Assembly in Package" to "False".

Include Assembly in Package

2) Edit the Package manifest and include the assembly from the project's own output. Add the assembly / namespace as a SafeControl.

Friday, October 28, 2011

SharePoint Anonymous Access

I was trying to change the Anonymous Access settings for a list, as per this screen:


SharePoint Anonymous Access checkboxes

However, when I checked the "Add Items" box and clicked OK, it did not save the changes. Everytime I repeated this and went back to the screen, the "Add Items" box was not checked.


The cause of the problem was that the Anonymous Policy for the SharePoint Application (that hosted the site) had been changed. By default this is set to "None". However, it had been set to "Deny Write".


SharePoint Anonymous Policy

There wasn't a good reason for this and switching it back to "None" fixed the problem.

Monday, October 24, 2011

SharePoint SummaryLinks "Edit Properties"

While logged-in as a user with Contributor permissions, I noticed that the toolbar for a Summary Links field was not visible on the Edit Form of a publishing page.

This is is shown in the picture below:

SummaryLinks has no

I suspect this is a SharePoint bug as the toolbar was visible when the page was in WYSIWYG edit mode.

Also, the issue did not occur when logged-in as a Site Collection administrator.

A work-around to this issue is to give the user the Manage Lists permission. However, this is really not something you should consider lightly as it gives editors an awful lot of power.

I'm going to speak to Microsoft to see what they say about it and then I'll post an update....

UPDATE


Microsoft has acknowledged that this is an "Offbug" (as they call it). In other words, it's a bug in their code.


This will be fixed in a future hotfix or service pack. However, they will not / cannot give a date for the fix.

Monday, June 27, 2011

SharePoint "Corrupted Control Template"

I began seeing the error message "Corrupted Control Template" when I switched a Publishing Page into Edit Mode.

Eventually I tracked-down the issue....

1) Another developer had created a number of custom fields.
2) They had created a file called "fldtypes_custom.xml" (which is required to register the custom field types).
3) I renamed this file to something more specific.

To fix the issue I had to....

1) Delete the Web Application (including the associated Content Database)
2) Rename the file back to what it was before I changed it
3) Re-deploy the solution.

Wednesday, May 25, 2011

SharePoint "Object reference not set to an instance of an object" Page Save

I'd created a custom page layout, applied it to a page and then tried to edit the page. Everything was fine until I clicked on one of the save options for the page. At this point the site blew-up with the following stack trace:

NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.SharePoint.WebPartPages.WikiPageWebPartSaver.SaveWebPartsInRichText(SPWebPartManager wpmgr) +230

It took a bit of work but I tracked-down the cause. Essentially the Designer had given me some HTML mark-up which I'd pasted into the page layout. This mark-up contained an additional "form" element. When this was removed, the page-save worked correctly.

UPDATE

I don't remember the exact code, but it was something like the code below. The first form element is generated by SharePoint. The second form element was pasted-in by mistake.

<form id="aspnetForm" method="post" name="aspnetForm" action="default.aspx">

...

<form action="destination_url" method="get">
</form>


...

</form>

Friday, May 20, 2011

SharePoint "Item does not exist. It may have been deleted by another user"

I'd created an Event Receiver to handle the ItemDeleted event. I'd assigned this to a ContentType, which was then added to a Picture Library.

Click the image below to see what the code looked like. Initially, this seemed to work prefectly. (I'm using an image to show the code so that the text formatting is unmangled and read-able).



However, if I selected multiple pictures in the library and then clicked the "Delete" option from the library's menu, an unhandled exception was thrown which read "Item does not exist. It may have been deleted by another user".

I discovered the fix for this, which was to re-arrange the "try" blocks in my code. So instead of having the try-catch block surrounded by the try-finally block, I switched them so that the try-catch block is surrounded by the try-finally block.

I suspect the error was being generated because of a thread-timing issue, since (when the error occurred) the debugger wouldn't hit any breaks points in the code.

The re-worked code is shown below. I realise I could also reduce the code by using a try-catch-finally block, rather than 2 try blocks.

Thursday, May 19, 2011

SharePoint site "cannot be imported because its parent does not exist"

I ran a content deployment job from my farm to a farm on another machine. The job failed with the message:

The site /deleteme2/Lists/test1 cannot be imported because its parent does not exist.

Right now I cannot explain why this failed. "DeleteMe2" was a test site that I'd created and subsequently deleted. The site had defintely gone and my farm had no orphaned sites.

To work around the problem, I changed the deployment job so that it only exported a specific site, rather than the entire site collection.

This got me up-and-running and I'll continue to investigate.

Wednesday, May 11, 2011

SharePoint Always Prompts for Credentials

I had a SharePoint site running quite happily on my Dev VM. However, when I tried to connect to the site from my base machine, I was repeatedly prompted for credentials and could not connect.

This was surprising as the domain account I was logged-in as was the same for both the base machine and the Dev VM.

I tried a number of possible fixes, including:

1) Adding the site address to my Local Intranet zone
2) Disabling the loopback check
3) Checking that the firewall (running on the Dev VM) was not blocking access
4) Using a non-Internet Explorer browser

Nothing worked!

However, I thought I'd create a new SharePoint application and then try connecting to that. While doing this, the following error message was shown: "The trust relationship between this workstation and the primary domain failed."



The fix to this issue was to remove, then re-add the Dev VM to the domain. After I did this, I found the connection issue went away.

Wednesday, March 2, 2011

SharePoint “Unable to process Create message”

You may see this error message when you try to create a new User Profile connection: “Unable to process Create message”.

This can be caused for a number of reasons. However, in our case this was because:
  1. Our servers / user accounts were installed in an Active Directory whose Netbios name was different to the Fully Qualified Domain Name.
  2. The SharePoint 2010 December Cumulative Update had been applied to the farm.

This is a known issue, which Microsoft is investigating.

Thursday, February 24, 2011

SharePoint "The Product ID specified was not found"

Today I started the installation of a 4 server farm. The SharePoint 2010 setup media had been copied into a network folder location. I chose to copy that folder to all of the SharePoint servers, so that the setup program would run locally, rather than come across the network.

On each SharePoint server I ran the setup program and installed the prerequisites. This worked fine.

On one server, I then tried to install the main SharePoint program files but I got the following message: "The product ID specified was not found on the machine", as shown below.


Oddly this acutally worked on one of the servers, but for the other 3 it failed.

I can only assume that copying the setup folder to each server had somehow corrupted the files. Anyhow, the solution was instead to mount an ISO image as an optical drive on all servers, and that worked.

Friday, February 18, 2011

SharePoint failed to retrieve field value

Issue: The Associated Content Type of a page layout is shown as "failed to retrieve field value".

After packaging and deploying some new page layouts, I went to the home page of a site collection and tried to put the default page into edit mode.

The following page error appeared: "Value does not fall within the expected range".

The stack trace wasn't very helpful. However, when I looked at the "Master Page" gallery using the Site Content and Structure tool, I noticed the issue described above. Here is a screen shot, with the problem highlighted in yellow:




I went back to the module definition for the page layout and compared it with some others in the same file.

The error was caused because of a missing # symbol, which should have preceeded the content type reference. This is shown below, again with the issue highlighted:

Friday, February 4, 2011

Content controls have to be top-level controls in a content page

I made a change to a page layout to include a CSS file and started seeing an error message which said "Content controls have to be top-level controls in a content page".

This is how the markup looked; can you see the error?

<asp:Content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">

<ContentTemplate>

<SharePointWebControls:CssRegistration name="/_layouts/1033/styles/Themable/search.css" runat="server" >

</ContentTemplate>
</asp:Content>


Did you spot the error?

The CssRegistration declaration was missing its closing tag. Once fixed, the page worked correctly.