<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wall Of Scribbles &#187; SharePoint</title>
	<atom:link href="http://wallofscribbles.com/tag/sharepoint/feed/" rel="self" type="application/rss+xml" />
	<link>http://wallofscribbles.com</link>
	<description>The ramblings of a man</description>
	<lastBuildDate>Fri, 21 May 2010 11:07:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Cannot insert the value NULL into column Name, Thanks SharePoint</title>
		<link>http://wallofscribbles.com/2008/03/07/thanks-sharepoint/</link>
		<comments>http://wallofscribbles.com/2008/03/07/thanks-sharepoint/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 05:05:29 +0000</pubDate>
		<dc:creator>Corey Dutson</dc:creator>
				<category><![CDATA[Bad bad bad]]></category>
		<category><![CDATA[Bonus]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[good-practices]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[MOSS]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.wallofscribbles.com/2008/03/07/thanks-sharepoint/</guid>
		<description><![CDATA[I tried to create a Custom List. I had event receivers attached to custom lists and i got this:
Cannot insert the value NULL into column 'Name', table '[somesharepointcontentdatabase].dbo.EventReceivers';
column does not allow nulls. INSERT fails.
The statement has been terminated.

I found out what this means and how to get around it.]]></description>
			<content:encoded><![CDATA[<p>My feature code was throwing an error today. For those who don&#8217;t know what I&#8217;m talking about here is a crash course: A feature basically allows you to attach functionality to something in SharePoint. Maybe you want to add a menu option to the &#8216;Site Actions&#8217; menu, or import some files into libraries. In my case I wanted to attach functionality to a specific list. I wrote my feature code, and it seemed fine. Deployed and activated just great.</p>
<p>Then I tried to create a Custom List. I had event receivers attached to custom lists (ListTemplateID=100 for those who care) and i got this:</p>
<p><em>Cannot insert the value NULL into column &#8216;Name&#8217;, table &#8216;[somesharepointcontentdatabase].dbo.EventReceivers&#8217;;<br />
column does not allow nulls. INSERT fails.<br />
The statement has been terminated.</em></p>
<p>Took me a good two hours of trying everything I could think of with my XML and code, only to be repeatedly thwarted by this database-level error! I tried commenting out different sections of my receivers and still got the error. When I commented the entire <span style="color: blue">&lt;</span><span style="color: red">Receivers</span><span style="color: blue">&gt;</span> section, things ran fine, but not the <span style="color: blue">&lt;</span><span style="color: red">Receiver</span><span style="color: blue">&gt; </span>items inside. What the hell is going on? Read on!</p>
<p><p style="text-align:center"><script type="text/javascript"><!--
google_ad_client = "pub-9759400759564825";
google_ad_slot = "2377935838";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p></p>
<p>I&#8217;ll give an example  of what I&#8217;m talking about here &#8211; the following comes from <a href="http://msdn2.microsoft.com/en-us/library/ms460929.aspx" title="MSDN: Event Registrations" target="_blank">MSDN</a>:</p>
<p><strong>feature.xml</strong>:<br />
<span style="color: blue">&lt;</span><span style="color: red">Feature</span><br />
Scope=&#8221;Web&#8221;<br />
Title=&#8221;Simple Updating Item Event Handler Registration&#8221;<br />
Id=&#8221;A6B8687A-3200-4b01-AD76-09E8D163FB9A&#8221;<br />
xmlns=&#8221;http://schemas.microsoft.com/sharepoint/&#8221;<span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;</span><span style="color: red">ElementManifests</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;</span><span style="color: red">ElementManifest</span> Location=&#8221;elements.xml&#8221;<span style="color: blue">/&gt;</span><br />
<span style="color: blue">&lt;/</span><span style="color: red">ElementManifests</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;/</span><span style="color: red">Feature</span><span style="color: blue">&gt;</span></p>
<p><em>inside the feature.xml file (above) it references the following file:</em></p>
<p><strong>elements.xml</strong>:</p>
<p><span style="color: blue">&lt;</span><span style="color: red">Elements</span> xmlns=&#8221;http://schemas.microsoft.com/sharepoint/&#8221;<span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;</span><span style="color: red">Receivers</span><br />
ListTemplateOwner=&#8221;ADDABAAA-1111-2222-3333-111111111111&#8243;<br />
ListTemplateId=&#8221;104&#8243;<span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;</span><span style="color: red">Receiver</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;</span><span style="color: red">Name</span><span style="color: blue">&gt;</span>SimpleUpdateEvent<span style="color: blue">&lt;/</span><span style="color: red">Name</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;</span><span style="color: red">Type</span><span style="color: blue">&gt;</span>ItemUpdating<span style="color: blue">&lt;/</span><span style="color: red">Type</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;</span><span style="color: red">SequenceNumber</span><span style="color: blue">&gt;</span>10000<span style="color: blue">&lt;/</span><span style="color: red">SequenceNumber</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;</span><span style="color: red">Assembly</span><span style="color: blue">&gt;</span>SimpleUpdateEventHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=10b23036c9b36d6d<span style="color: blue">&lt;/</span><span style="color: red">Assembly</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;</span><span style="color: red">Class</span><span style="color: blue">&gt;</span>MS.Samples.SimpleItemUpdateHandler<span style="color: blue">&lt;/</span><span style="color: red">Class</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;</span><span style="color: red">Data</span><span style="color: blue">&gt;</span><span style="color: blue">&lt;/</span><span style="color: red">Data</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;</span><span style="color: red">Filter</span><span style="color: blue">&gt;</span><span style="color: blue">&lt;/</span><span style="color: red">Filter</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;/</span><span style="color: red">Receiver</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;/</span><span style="color: red">Receivers</span><span style="color: blue">&gt;</span><br />
<span style="color: blue">&lt;/</span><span style="color: red">Elements</span><span style="color: blue">&gt;</span></p>
<p>This works fine. Here&#8217;s something interesting though: any comments &#8211; <font color="#0000ff">&lt;</font>!&#8211; <font color="#008000">Like this</font> &#8211;<font color="#0000ff">&gt; </font>- you have in the  <span style="color: blue">&lt;</span><span style="color: red">Receivers</span><span style="color: blue">&gt;</span> node will be literally interpreted as <span style="color: blue">&lt;</span><span style="color: red">Receiver</span><span style="color: blue">&gt;</span> nodes! That means whenever it tries to attach event receivers to any list, it treats the comments as actual receivers! That&#8217;s right, for whatever reason, the code that ties event receivers to lists literally loops through every node (comments are still considered nodes!) and tries to use them instead of using any sort of <a href="http://en.wikipedia.org/wiki/XPath" title="Wikipedia: XPath" target="_blank">XPath</a>. How hard is it to use &#8220;//Elements/Receivers/Receiver&#8221; as your node collection XPath? I really hope whoever wrote that code got the ruler or something.</p>
<h3>The solution: Remove comments from your Feature xml file(s).</h3>
<p>I say this because God only knows where else this is happening, and the odds of you realizing that it is something that should just work, like comments, are probably not that high. Remember folks, sometimes the most obtuse problems have the most simple answers. Try not to over-think things.</p>
<p>A huge thank you must go out to <a href="http://blogs.msdn.com/jannemattila/" title="Janne Mattila" target="_blank">Janne Mattila</a> for being the first (and apparently only according to Google) <a href="http://blogs.msdn.com/jannemattila/archive/2007/02/08/moss-and-eventhandler-deployment-with-features-cannot-insert-the-value-null-into-column.aspx" title="Janne Mattila: MOSS and EventHandler deployment with features + Cannot insert the value NULL into column..." target="_blank">documenting this</a>. I wish I had looked sooner.</p>
]]></content:encoded>
			<wfw:commentRss>http://wallofscribbles.com/2008/03/07/thanks-sharepoint/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Inconsistency Melts Brains</title>
		<link>http://wallofscribbles.com/2008/03/06/inconsistency-melts-brains/</link>
		<comments>http://wallofscribbles.com/2008/03/06/inconsistency-melts-brains/#comments</comments>
		<pubDate>Thu, 06 Mar 2008 05:05:48 +0000</pubDate>
		<dc:creator>Corey Dutson</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Movie Reviews]]></category>
		<category><![CDATA[Self-Improvement]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[consistency]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[good-practices]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[WSS]]></category>

		<guid isPermaLink="false">http://www.wallofscribbles.com/2008/03/06/inconsistency-melts-brains/</guid>
		<description><![CDATA[Everyone's done it. We get lazy, we're pressed for time, or we otherwise don't care enough to standardize our stuff. I can note this most prevalently in code, but it easily extends into design and every day life.  

I cannot claim to be innocent of this crime, nor would I. It takes effort, experience, and an iron will not to cut corners in everything you do.]]></description>
			<content:encoded><![CDATA[
<a href="http://wallofscribbles.com/gallery/Misc. Images/Random Dice.jpg" title="" class="thickbox" rel="singlepic544" >
	<img class="ngg-singlepic" src="http://wallofscribbles.com/gallery/cache/544__250x550_Random Dice.jpg" alt="Random Dice.jpg" title="Random Dice.jpg" />
</a>

<p>I&#8217;m bringing this up from an exceptionally small thing I noticed while at work today. As I have previously stated, I work with <a title="Microsoft SharePoint 2007" href="http://office.microsoft.com/en-us/sharepointserver/FX100492001033.aspx" target="_blank">SharePoint</a>. Much of the time I am branding it (though not in my current project!) and so I have a rather intimate and abusive relationship with the program. I find myself constantly finding weird styling quirks put into the environment that prove that SharePoint was built by a large group of people.</p>
<p>There are many instances within SharePoint &#8211; and I&#8217;m sure within <a title="Microsoft WSS 3,0" href="http://office.microsoft.com/en-us/sharepointtechnology/FX100503841033.aspx" target="_blank">WSS</a> as well &#8211; where certain styles that should be consistent end up being done completely different ways. I wish I had a screen shot as an example, but you&#8217;ll have to use your imagination here. Picture two dropdown buttons. When you hover over them, they glow, and a menu appears. No picture the HTML for both dropdown buttons being completely different, with no shared styles or markup whatsoever.</p>
<p>This happens all over the place. Hell, there is markup all over the place that is either broken, non-standard (<a title="SharePoint 2007: What the hell, man?" href="/2008/01/31/sharepoint-2007-what-the-hell-man/" target="_blank">don&#8217;t get me started</a> on WSS/SharePoint and it&#8217;s default markup) and over 6 thousand lines of styles if you add up all the sheets. 6 thousand! There is no need for that, and yet it exists because of &#8211; <em>say it with me now</em> &#8211; the lack of consistency.This lack of consistency then cascades down to people like me, who are stuck styling the damned things. Had there been a discussion between the differing groups, or the markup left to a third group so that they could all be structured the same way other peoples lives would then be made easier.</p>
<p><p style="text-align:center"><script type="text/javascript"><!--
google_ad_client = "pub-9759400759564825";
google_ad_slot = "2377935838";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p></p>
<p>Another example I can bring up is with code. My code, my co-workers code, random interweb code, it happens everywhere. It is far more frequent when you work on rapid products, or many projects that build off of their predecessor. I can speak from experience that unless you code with the future in mind you will end up patching things&#8230; usually more than once.</p>
<p>In a perfect world you&#8217;d be able to properly scope your work out, develop your use cases, figure out your flow, and develop in a modular, expandable way. This of course requires a couple things: Time, patience, and knowledge. I can assure you that even if you think you have all three you don&#8217;t. The only time this can <em>ever </em>happen is when you are developing something for yourself and even then more often than not you&#8217;re just throwing something together for your own use, and those tend to be the worst for patch jobs&#8230; at least from my experience.</p>
<p>In the end all I can say is <em>plan things out</em>. Figure out a system and stick to it; even if it&#8217;s not the best it will at least not be the best everywhere. This makes it much easier to upgrade/fix later on. If you come up with 5 different solutions for 5 different things when they could all share common attributes, you are just making more work for yourself.</p>
<p>Save your time, your brain, and your fellow workers from the agony of added work brought about by inconsistency. Get a game plan, stick with it, and for the love of god: be consistent.</p>
<p><em>P.S. I managed to spell consistency wrong every time in this post while writing it.</em></p>
<p><em>P.P.S. Except for the one in the first postscript.</em></p>
<p><strong>Update:</strong><br />

<a href="http://wallofscribbles.com/gallery/Misc. Images/Sharepoint-dropdown.jpg" title="" class="thickbox" rel="singlepic545" >
	<img class="ngg-singlepic" src="http://wallofscribbles.com/gallery/cache/545__400x400_Sharepoint-dropdown.jpg" alt="Sharepoint-dropdown.jpg" title="Sharepoint-dropdown.jpg" />
</a>
<br />
Success! I have a screen shot of the dropdown menus in question!<br />
<em>(Technically this update happened before the post went public, but whatever) </em></p>
]]></content:encoded>
			<wfw:commentRss>http://wallofscribbles.com/2008/03/06/inconsistency-melts-brains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
