Hiding Unexpected Response from Server Error when using SharePoint 2010 Calendar Overlays

18 October, 2011

Hiding Unexpected Response from Server Error when using SharePoint 2010 Calendar Overlays

The Calendar Overlays in SharePoint 2010 is a fantastic feature which allows you to display multiple calendars in the same view. This allows you to logically partition your calendar events into separate calendars and view them all together without having to lump them all in one calendar. This makes maintaining the calendars far simpler, especially as each calendar can have it’s own permissions limiting read and write access to the events.

An example from a school might be:

Calendar Name Read Permissions Write Permissions
Whole School All Calendar Editors Group
Exams All Calendar Editors Group
Staff Staff Calendar Editors Group

Here’s a sceenshot of the calendar’s overlayed in month view. The Whole School events are in green, the Exams in yellow and the staff in blue.

calendarOverlay

  This all works great out of the box. The problem comes when you don’t have permission to one of the calendars. So when a student views this they can see all the events from the Whole School and Exams calendar, but also get the error message “Unexpected response from server”.

unexpectedResponse

 

This doesn’t look very good.

Luckily there’s an easy solution to this. You just need to add the following css to the page. The easiest way is through a content editor web part, either directly in it, or my preferred method is to link to a text file with it in so it can be reused.

 
 

 

This will hide the text and error image from showing so they won’t know that anything is amiss, or that there is a calendar they don’t have access to unless they look at the page source.

Richard Willis

Written by

Copyright © 2023 SalamanderSoft Limited