Handling IIS Error pages in Sitecore

Sitecore lets you direct errors, such as page not found, to other pages within Sitecore. This is good – it lets you have an error page with all your dynamic content (navigation menus, account details, etc).

You can patch this in with something like:

<?xml version="1.0"?>
<configuration xmlns:x="http://www.sitecore.net/xmlconfig/">
<sitecore>
<settings>
<!-- Default: /sitecore/service/notfound.aspx -->
<setting name="ItemNotFoundUrl">
<x:attribute name="value" value="/errors/Item Not Found" />
</setting>
<!-- Default: /sitecore/service/nolayout.aspx -->
<setting name="LayoutNotFoundUrl">
<x:attribute name="value" value="/errors/Item Not Found" />
</setting>
<!-- Default: /sitecore/service/notfound.aspx -->
<setting name="LinkItemNotFoundUrl">
<x:attribute name="value" value="/errors/Item Not Found" />
</setting>
<!-- Default: /sitecore/service/noaccess.aspx -->
<setting name="NoAccessUrl">
<x:attribute name="value" value="/errors/No Access" />
</setting>
<!-- Default: /sitecore/service/error.aspx -->
<setting name="ErrorPage">
<x:attribute name="value" value="/errors/Error" />
</setting>
</settings>
</sitecore>
</configuration>

Great, job done, right?

Nope…  Continue reading “Handling IIS Error pages in Sitecore”

Advertisements
Handling IIS Error pages in Sitecore

Error: CQWP – RSS feed of non-documents doesn't work

This is a pretty weird error. I was doing content roll-up of Announcements lists, to give a unified news channel for our intranet. Naturally, I decided to do this using the Content Query Web Part. I added one, and selected that I wanted to query for the contents of Announcements lists. As I like RSS feeds, I enabled one, and I added it to my favorite feed-reader.

It worked – but the links to the announcements themselves didn’t work. The short summary is that is that it appears RSS feeds from Content Query Web Parts don’t work when you query for certain types of list. Continue reading “Error: CQWP – RSS feed of non-documents doesn't work”

Error: CQWP – RSS feed of non-documents doesn't work

Stuff I forgot to style

SharePoint has a lot of page elements, and it’s hard to brand it all without missing things. Lists of Page elements like Heather Solomon’s CSS Reference Chart and her “Oh crap, I missed that” list help, but I still found a few that weren’t mentioned. So, I guess this is my “Thank God my testing found I’d missed that” list:

Advanced Search Page – nice grey.
Creation Information Panel – when you hover over an item on the ‘Create’ page, you’ll see this.
People Search Options – shown dynamically when you click the link.
Gantt views – as used in projects
Repeating Meeting Left Nav
WSS Search results page – just ‘cos you’re using it doesn’t mean it isn’t there – or that it won’t be seen…
The Date Picker – and all the problems inherent in that…
Stuff I forgot to style

Corrupt Breadcrumbs in the in PageAreaTitleFrame

I was tempted to call this “The incredible case of the bust rendering of SharePoint pages”, but it seemed a bit long, to be honest. This is a bit of a detective story (and if I’d the developer who built this in the first place, there’d be a murder) so stick with me… Continue reading “Corrupt Breadcrumbs in the in PageAreaTitleFrame”

Corrupt Breadcrumbs in the in PageAreaTitleFrame

SharePoint throws unhandled exceptions by design

So, I was doing some testing of some branding, and I took a look at the Survey list. I tried filling out a survey and was shocked by a yellow screen of death:

This was because I’d set SharePoint up for debugging during development. The SharePoint error page appears:

Well, the error is right – I was trying to fill in the survey twice. But it’s not like this is an unexpected error – it certainly shouldn’t be an unhandled exception!

What are the problems with this? Well, it kicks us out of the branding experience I’ve built, which is annoying. It doesn’t allow the user to navigate anywhere. And, dammit, it’s just bad practice! I mean, do these errors appear in the logs?

Don’t get me wrong, no code is perfect and exceptions will happen. That’s fine. But who the hell thought unhandled exceptions was a good bit of deliberate functionality?

Anyone else found other deliberately unhandled exceptions?

SharePoint throws unhandled exceptions by design

STSADM Error: Object not set set to an instance of an object

I’d built a .wsp (Web Solutions Package) for a customer, containing the branding I’ve been working on. However, when they tried the command:

stsadm -o addsolution -filename branding.wsp

they got the error:

Object reference not set to an instance of an object. c:branding.wsp: The Solution installation failed.

Interesting – works on my machine. They were running the command as the ‘Administrator’ user on the SharePoint system. A bit of digging, though, showed that the problem was due to either:

  • Not running under a Farm Admin account (which I understand the ‘Administrator’ user was)
  • Not having rights to the Central Admin Content Database on SQL server.

Well, we tried running the STSADM command as the service account, and that appeared to work. ‘Course, this is all over the phone so I’m not certain what permissions that account has, but it appeared to run.

STSADM Error: Object not set set to an instance of an object

Workflow Error: System.InvalidOperationException and the Correlation Token

I got a slightly obscure error message when trying to run a DeleteTask activity in my workflow:

System.InvalidOperationException: Correlation value specified does not match the already initialized correlation value on declaration taskToken for activity deleteTask1.

Hmm. I checked the correlation token though – and it was fine. And what’s it doing initialising another token? Found the answer though, courtesy of Matt Morse – I’d not set the task ID property for the delete task activity.

This did lead me around to wondering why I have to? I mean, we’ve a correlation token for the task. The correlation token contains the TaskID. And yet I have to specify both of these things to the DeleteTask activity to identify the task I want deleted? Something ain’t right there…

Workflow Error: System.InvalidOperationException and the Correlation Token