Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Page printed from: https://blog.jermdavis.dev/page/27

A blog about technology that catches my attention (Page 27)

It's a bit like a swap-file for my brain...

10 years, 335 posts and counting

My favourite confusing exception

Spending a lot of time developing websites with Sitecore means I've reported my fair share of bugs to support. One particular issue that I came across in 6.6 a while back stands out as my "favourite" issue I've reported – just because the error stops a lot of developers in their tracks thinking "how on earth can this happen?". If you wrote this code, would you think it could crash?

Well it can crash. And to a less experienced developer it can be a very confusing error:

Bug C# Sitecore ~1 min. read

Programmatic WFfM submissions

Recently a client of mine came up with some requirements that involved submitting data to the Web Forms for Marketers database via code. Having done a bit of Googling, I came across a Stack Overflow answer on the same subject which seemed to offer a solution. Implementing this code did indeed allow submitting data – however it didn't trigger Save Actions. So while the data will go to the configured WFfM data store, emails or CRM integrations won't get triggered.

That was an issue for my client, who wanted to have email notifications as well. So starting from the Stack Overflow responses, I looked into how the WFfM save actions can be correctly triggered via code.

Sitecore WFfM C# ~3 min. read

ItemURIs are useful!

I was down at Sitecore's offices for a training course the other week and got shown how useful the URIs for Sitecore items can be to your code – something I'd managed to miss before. So in the spirit of sharing, if you've not thought about uses for URIs, have a think about this:

It's a fairly common scenario in Sitecore code: You need to pass details about a specific item between two bits of code, but due to some sort of process boundary you can't pass the specific Item object. Given that a specific bit of content in Sitecore is specified by its database, identifier, version and language, how can you pass all that data across a boundary easily?

Sitecore ~1 min. read

Using NuGet for Sitecore dev instances: Uses and conclusions

In my last two posts [first part, second part] I've outlined the results of some research into an approach for how you can package Sitecore with NuGet. I presented this at a recent Sitecore Technical User Group, and am documenting it here with a bit of detail that didn't fit into the presentation. This week I'll finish off the set of posts with a few conclusions from this experiment.

Using NuGet for Sitecore dev instances: Further files

Last week I started writing up the content from my Sitecore Technical User Group presentation on using NuGet for the easy creation of new development instances. This week I'm continuing that topic, with the next steps for package creation:

Using NuGet for Sitecore dev instances: Background and beginnings

A couple of weeks ago I had the chance to speak at the Sitecore Technical User Group in Manchester. I gave a talk about experiments into how you can put Sitecore into a NuGet package in order to create low-effort developer instances. Due to time constraints I wasn't able to get all of the information I wanted into the presentation, so over the course of my next three posts I plan to write up the key info from the presentation with that extra detail.

How did I miss this bit of SIM automation?

Quick one today, as I need to spend time writing up my presentation from the Sitecore Technical User Group in Manchester last week. (Hopefully will have something done for next week's post)

SIM Sitecore ~½ min. read

That search index rebuild option is too hard to find...

The other day a colleague remarked on how much time was wasted navigating down to the search index rebuild options in the Sitecore 6.6 Control Panel. While there are a variety of other ways of triggering a search rebuild, (Sitecore Rocks for example) it was suggested that having a button on the Ribbon (as per Sitecore 7) would be helpful in this case. So here's a quick set of instructions for one way it can be added:

Lucene Sitecore UI ~1 min. read

Pesky file system permissions

If any of you have children, you're probably well aware of their awesome ability to spread around every new variation of the common cold that appears. This week I've been mostly suffering under the latest of these "presents" from my son, and to be honest may not be doing my sharpest ever thinking...

Coincidentally it took me a bit of head-scratching to resolve a problem with an experimental instance of Sitecore 6.6 that I wanted to make use of the other day. Browsing to the public site appeared fine, but when I tried to load Content Editor I was greeted with an exception saying Access to the path 'C:\inetpub\wwwroot\TEST\Data\viewstate\1\7\E' is denied.:

Logging patterns for Sitecore 6.6

While working on the logging configuration for sending messages via email last week, I realised that all the documentation I could find for the element was for a newer version, and this wasn't helping me work out how to use it.

So with a bit of research, I've dug out the important values that can be used in case anyone else needs to configure log messages in older versions of Sitecore:

Logging Sitecore ~2 min. read