Archives

Archives / 2012
  • Error when creating a site from a custom template: "A duplicate name 'FieldName' was found"

    This happened to me in a client's WSS3 environment, but it seems to apply to 2010 as well. I had a site template created in one environment, but upon moving it to another, the Create Site operation resulted in a neat little error, complete with stack trace: "A duplicate name 'YourField' was found". Upon investigating, I found that one of the lists in the newly-created site did indeed have duplicate fields. What was odd in this case was that the the list was based on a content type, and only one of the duplicates came from said content type. I deleted the extra fields, re-saved the template in the new environment, and created again -- only to have similar results. Several forum posts recommend cutting open the template on your local machine, editing the XML, and rebuilding the solution CAB, but in my case, all it took was a quick "Delete list" followed by re-creating it and re-adding the content type. Save as template again, and this time -- instant site creation satisfaction.

  • SharePoint Saturday Houston: 9 days and counting

    In just over a week, I'll be speaking at SharePoint Saturday Houston. My topic will be Manipulating SharePoint with Client-Side JavaScript; we'll address client-side coding as a whole, look at the Client-Side Object Model, and then dive into a working sample app using the CSOM and jQuery.  Come see how easy it is to develop complex solutions for SharePoint 2010 without ever opening Visual Studio.

  • SharePoint Client Object Model: Step One

    I almost didn't make it out alive.  I followed the instructions in every piece of sample code and every forum post by someone who had no idea why their client OM code wasn't working, and my code still wouldn't get past the page load.  I kept getting "'Type' is undefined" errors when sp.core.js tried to register the SP namespace.