Enable-SPFeature does not trigger the feature receiver

Posted by Eric Bartels

Today I encountered the same problem as stated in a blog post by Christopher Maish. When activating the feature via powershell the associated feature receiver was not called. Trying the suggested solution in the blog post drove me to the cause of this problem. When using stsadm I got an “access denied” error. I did [...]

Using powershell to quickly debug SPSiteDataQuery

Posted by Eric Bartels

Writing CAML-Queries is still no fun. Even with SharePoint 2010… So you often need to test your queries before they actually work. In case you quickly want to test if your SPSiteDataQuery is correct you can use powershell to “debug” it. Just create an instance of the site-collection and target the root-web with your query-instance. [...]

How-to replace textarea-tags with simple div-tags including its content for a printing view

Posted by Eric Bartels

Today I was improving a printing-view of an application-page inside a project I’m working on. The “printing-mechanism” simply loads the page with a different symfony layout and includes custom css- and javascript-files which hide certain elements from the printing view. Unfortunately the page also contains textarea-elements which get scrollbars when the content is larger. This is [...]

Solving NULL values are recognized as text-values within dynamic queries in PostgresSQL

Posted by Eric Bartels

I’ve written a dynamic query which is finally executed via EXECUTE my_dynamic_query; The query contained a select list in which two columns should always be NULL. — … stuff before dynamic_select_cols := ‘tbl1.foo, tbl1.bar, null AS theAlias1, null AS theAlias2, tbl2.foo2′; — … stuff after combining the dynamic queries EXECUTE my_dynamic_query; In my case the [...]

Using a C# preprocessor directive for testing custom timer-jobs

Posted by Eric Bartels

If your are writing custom timer-jobs for your SharePoint solution it will happen that you write jobs which are only executed once a day or even less often. As a developer you cannot wait that long… You could of course comment in and out (via ctrl + k, ctrl + c / ctrl + k, [...]