SharePoint 2010 - Quick Fix for Ribbon Page Layout switch JavaScript error


1. Your content editor is trying to change page layout via the Ribbon in SharePoint 2010


Figure: Click Page Layout in the Ribbon

2. But they get a JavaScript error

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)

Timestamp: Wed, 22 Dec 2010 01:33:17 UTC

Message: Object required

Line: 2

Char: 6422

Code: 0


This error is likely caused by SharePoint trying to render available page layouts for the page to switch to, but there is an error.

A very quick fix that can be applied by a site owner is:

1. Site Settings | Look and Feel | Page layouts and site templates

2. Restrict the valid number of page layouts that can be used, instead of allowing "Pages in this site can use any layout"


Figure: Restrict valid page layouts

3. This fixes the Ribbon menu


Figure: Ribbon menu fixed!

4. Tell your sys admin that there are broken packages in SharePoint and must be fixed ASAP

Windows Phone 7 - enabling wireless sync

Wireless sync is configured via the Zune software.

  1. Have your phone join the wireless
  2. While plugged into the PC, navigate to: Zune | Settings | Phone | Wireless Sync
  3. Select your current home (or office) wireless network, and "Enable Wireless Sync"
  4. The rules are:
    • When charging and idling for longer than 10 minutes
    • Within the selected wireless network(s)
    • The phone will automatically sync photos, podcasts
    • (email/contacts/calendar are synchronized with the cloud so those can happen any time)

Silverlight is for Business Apps, HTML5 is for Flash


Silverlight has always been about Business Apps since version 2.
HTML 5 - well I don't think this will ever be suitable for Business Apps.


Most of us that have been actively working with Silverlight has never had the misconception that Silverlight was about reach.  Yes Silverlight 1 was rushed out the door because we don't really want to learn Flash, the Olympics was happening, Microsoft saw an opportunity and pushed it - while the rest of the world was going Flash because of Video and YouTube.

Silverlight evolved quickly, because the community responded and Microsoft heard what we're asking: business apps.  Ever since Silverlight 2 was available we have had great tools, support for connecting to services and hundreds of controls for building business applications.  We started using it for intranet and even Internet business applications (as long as you only support Windows and Mac - it works just fine).

Sure, some "might" have hoped we'd see Silverlight on the iPhone one day - but let's be serious I really doubt that day would ever come.  There's this big fruity company in the way. 


While HTML5 is great for the mobile devices, I don't see corporate upgrading to the latest browsers for another 5 or more years (so many are still on IE6/XP).  By contrast, Silverlight runs on IE6.  This makes Silverlight still the best choice for the next decade, even before you consider the possibilities for hosted online services (SharePoint, Exchange or CRM), or Windows Phone 7.

I would love to see HTML5 be successful, but people who only think Silverlight is about video or the canvas element is really missing the mark.  Technology-wise, I think HTML5 is still a few years behind Silverlight.


So I did some napkin Maths.

  • Say, it will take HTML5 another 2 years for the standard to mature.  (2012)
  • MS tools and JavaScript frameworks (JQuery-Mobile) should be ready pretty quickly.  (2014)
  • Based on current corporate adoption rates - let's add another 5 years to upgrade to IE9 (or later).  (2017)
  • Newest Mobile devices should move quicker.  (2013)
  • Except old devices will never work:  old iPhone, blackberry, windowsphone 6.5


  • So, 2014 or 2017 to be able to use HTML5 for less features than Silverlight 2.  Great. Fantastic.


Let's consider the scenarios to build applications:

Internet - any browser

  • HTML4 - best reach - shit "rich UI"
  • Flash - no mobile
  • Silverlight - less reach than Flash, works on most Windows and Mac, no mobile
  • HTML5 - adoption too low

Internet - mobile browser

  • HTML4 - best reach
  • Flash - bad bad
  • Silverlight - bad - Windows Mobile, Symbian (support woeful)
  • HTML5 - only for latest/future mobile devices

Intranet - MS environment

  • HTML4 - best reach, not rich
  • Flash - so so, but in a MS environment lack skillset to develop Flash/Flex
  • Silverlight - great, easy to deploy, installation independent of IE version
  • HTML5 - 2017

Intranet - MS + Mac

  • HTML4 - best reach, not rich
  • Flash - so so, but in a MS environment lack skillset to develop Flash/Flex
  • Silverlight - great, easy to deploy, installation independent of IE version
  • HTML5 - 2017


I wonder about the whole "HTML5 standards" - the IT industry is littered with corpses of different vendors coming together to put together different implementation of the same spec

  1. Java (write once debug everywhere)
  2. XHTML 1.1
  3. HTML 4
  4. Open GL
  5. SVG

At the very end - you can't trust ANY implementation - you end up relying on a framework to smooth out the differences and give you the lowest common denominator:

  1. Java Swing
  2. JQuery


The conclusion I came to is not pretty for HTML 5:


Microsoft-Corporate environment / Business Apps:

  • Silverlight (rich)
  • HTML4

Mobile Devices (latest / future)

  • HTML5 (reach) - I wanted to recommend HTML5, but really, the more I think about this, do I really want to use a web app on my WP7 or iPhone?  Really?  That would be pretty silly.  We're talking about rich interfaces here, may be in another 2 years when tools are better at faking it.  Does HTML5 even have multi-touch, GPS or camera support?  Do I have to code gesture-recognition in JavaScript?
  • Build 3 versions for (rich)
    • Java - Android
    • Silverlight - WP7
    • Objective-C - iPhone

Public Internet

  • HTML5
  • HTML4 (degrade for unsupported browsers - lose rich retain reach)
  • Build two versions
    • HTML5 optimized for mobile browsers
    • HTML4 for unsupported desktop browsers


Intranet Application where Reach is important on new devices

  • Need to support Android, iPhone, Windows Phone 7 and iPad
  • Reach is paramount, and development budget does not allow 3 individual versions
  • Go for HTML 5, with HTML 4 graceful degradation
  • For this scenario, I would argue that you build the HTML4 experience right now, and wait to build the HTML 5 experience later - the later you can wait, the more mature the tools and browser gets.


Please let me know what you think - would love to be corrected. 

Windows Phone 7: Exchange with Self-Signed Certificate

I wonder if this is a game breaker.  Many corporate Exchange servers use a self-signed certificate, and push that certificate into client PC's root CA via group policy.

  • With desktop PCs, you can push that certificate and install it
  • With the iPhone, it seems that the phone can ignore this.
  • With Windows Mobile 6.5, you can install additional certificates.
  • But with Windows Phone 7, you can't install additional certificates, which means you can' synchronize with the Exchange server, unless you switch off HTTPS (bad - we're talking about synchronizing contact, emails over the air here…), or buy an expensive certificate from a trusted Root Certificate Authority.

Hopefully Microsoft fix this soon.

Windows Phone 7 - can I switch off the iPhone yet?


One final check-list before turning the iPhone off:

  • Contacts - via Exchange - OK
  • Mail - via Exchange / Gmail - OK
  • Safari - will be so glad to see it gone - got IE
  • iPod - has Zune / podcasts loaded

Cloud is great.  Zune rocks.  Hurray no more iTunes.

Onto the apps:

  • Photos - sync Windows Live Photo Gallery - OK
  • Notes - HTC ships a notes / lists app, but I plan to use OneNote (sync to cloud)
  • Messages - nothing I need to keep
  • Facebook - has integrated, as well as app
  • Maps (Google) - to Bing Maps
  • Foursquare
  • Stocks - HTC ships a Stock app


  • Skype
  • Windows Live Messenger
  • Kindle - collection online
  • Echofon - will be using official Twitter app
  • Urbanspoon
  • Blizzard authenticator - disconnected iPhone authenticator from account

Games - bought lots of games - if I have an urge to play them again I might buy it again… otherwise thanks for all the fun times

  • Carcassonne
  • Oregon Trail
  • Pocket God
  • Civ Revolution
  • Bejeweled 2
  • PuzzleQuest
  • Babel Rising
  • Angry Birds
  • PvZ
  • DoodleJump
  • Zombie Smash
  • Doodle God
  • Helsing's Fire