All Posts By

Scott DePouw

scott-depouw

Scott has been working with .NET and web technologies for several years, having developed many applications and web sites. He's an experienced developer, well-versed in many flavors of ASP.NET and C#, SQL, JavaScript, and even some CSS. He loves to solve problems, and is a major proponent of Test Driven Development. In recent years, he's become experienced in Telerik's Kendo UI and Sitefinity products.

Articles

Sitefinity Bug in Chrome v55

By | Google, Sitefinity | No Comments

Page Editing Drag and Drop Busted On December 1st, 2016, Google pushed out a new version of its internet browser Chrome. Chrome v55 installed and automatically updated on a huge number of machines (as is the standard for silent auto-updating software) and it went off without a hitch. While Chrome was dandy, however, it turns out that it broke something in Sitefinity! A major component to Sitefinity, in fact: Dragging and dropping widgets when editing pages or page templates. Unless you are in an environment where automatic updates for Chrome are disabled, you are now susceptible to this issue if…

Read More

Rewriting URLs to Lowercase in Sitefinity

By | .NET, MVC, Sitefinity | No Comments

Enforcing Lowercase on URLs to Normalize URLs In any web application, it is generally a good idea to make sure that all of your content has only one way to reach them via a user’s address bar in their browser. Whether you accomplish this by using canonical URLs, strict discipline/convention (i.e. “I will never capitalize any directory or filename”, very hard!), or rewriting URLs into lowercase ones, they all accomplish the same goal. Google only sees one URL for content, and your SEO doesn’t take a hit for “duplicate content” like what may happen if you can go to www.example.com/Foo…

Read More

Multilingual Publishing in Sitefinity

By | C#, Sitefinity | No Comments

Initially Publish your Content in a Non-Default Language Sitefinity has great multilingual publishing capabilities. From the perspective of an end-user / content manager, the backend offers up a myriad of methods to create content items both in the site’s default language as well as any other languages activated/enabled in the site itself. They’re all usually just one click away, and provide a good experience. But what about the development side of things? Say we have a custom widget that creates a content item, but the language either must be something apart from the default, or is user-selectable before creation occurs?…

Read More

Restoring Multilingual Translations in Sitefinity

By | Sitefinity | No Comments

Dude, Where’s my Translations? Occasionally I’ve run into an issue where enabling multilingual translations doesn’t correctly reach out to all aspects of my existing Sitefinity instance. Progress Sitefinity will allow translations to be made (under Interface Labels and Messages), and Pages and some content types will allow me to provide translations as well, but some dynamic content types will still behave as if there’s only one language available. Sledgehammer Approach My first thought would always be that maybe existing dynamic types have to be re-installed in order for translations to be made available to them. While you can uninstall a…

Read More

Enabling Email and Password Reset in Sitefinity

By | Sitefinity | No Comments

One of the common requests I get when working on various Sitefinity projects is to enable a feature in the Sitefinity backend that, by all appearances, is already on by default. I am talking, of course, about the ability for a site administrator to reset a Sitefinity user’s password from the backend, which reveals the password to the administrator (should they wish to notify the user personally) and also send an email to the user whose password was changed. While the UI is there out of the box and Sitefinity lets you attempt a password reset, in actuality nothing will…

Read More

QuerySelectorAll Error on BeginFormSitefinity

By | ASP.NET, MVC, Sitefinity | No Comments

When developing a custom form on Sitefinity MVC widgets, the HTML helper method Sitefinity provides, Html.BeginFormSitefinity(), is a very handy resource. You wrap your form elements up inside the whole thing, along with a submit button, and you can point it at an HttpPost Action on your custom MVC widget controller with ease. When you’re putting your form widget on a master page, however, you can run into a rather vague JavaScript error that prevents your form from submitting correctly. The error in JavaScript brings up something about querySelectorAll and you’re left scratching your head as to what you did…

Read More

Enable Sitefinity Page Editing for Custom Roles

By | Sitefinity | No Comments

Page Editing: Just Assign the Right Roles. Right? I recently worked with a client that was setting up users in the Sitefinity backend under custom roles. Some users can edit one group of pages, while other users can edit other groups of pages. Setting up these groups of pages with the permissions so that group A can edit while B cannot, and vice-versa, is trivial. …But is that all we do in order to give users the page editing powers we wish to grant them? Nope! In attempting to complete this setup, the client was running into an issue: Despite…

Read More

Widget Template Code Customized the Easy Way

By | .NET, ASP.NET, C#, Sitefinity | No Comments

Sitefinity’s Widget Templates provide a quick and easy way to change how Sitefinity renders widgets, both for built-in content types as well as custom ones. In the backend, it’s just a hop, skip, and a jump away to Design > Widget Templates to access a majority of the templates where you can manipulate the HTML used to render them. Oftentimes, though, you have to do more. Let’s say that, when iterating over a list of news items in the “Titles only” template you want to add a CSS class to some of the items, but not others. This goes beyond…

Read More

Preserve Feather Content Block HTML Formatting

By | JavaScript, MVC, Sitefinity | One Comment

Feather widgets in Sitefinity are a significant improvement over traditional Sitefinity widgets. They are more responsive, provide better tooling, and are easier to customize (both the main area as well as designer views). However, I recently encountered an issue with one of the basic default Feather widgets included with more recent versions of Sitefinity. In this post we’re going to see how to modify this behavior, so that when working with the Feather Content Block widget we have it behave the way we would like. This post also serves a second purpose: Introducing how to modify a built-in Sitefinity Feather…

Read More

Lock Down Content Widgets with UrlKeyPrefix

By | MVC, Sitefinity | No Comments

When you’re working with your content in Sitefinity, a very common practice to display said content is to provide a list and details view. On the page (or pages) containing these views, it is often good to provide a sidebar to provide for additional navigation functionality when users are browsing your content. News articles, for example, can support Tags to help classify stories into various buckets. It’s also nice for users to see a concise list of stories on the sidebar in addition to the more fleshed-out list that the page primarily shows. To accomplish this in Sitefinity appears trivial…

Read More

Locks in Sitefinity: Keeping Content Free

By | Sitefinity | No Comments

Exclusive locks are nothing new. It is a basic concept that tons of multi-user programs, tools, and systems use so that users don’t step on each other’s toes when they’re trying to work on something. It would be awful if you spend 30 minutes editing an article only to find that someone else stepped in and blew away your edits because they saw a typo and jumped in to quickly fix it. Sitefinity is no different in this regard: Pages, built-in content, and custom content all have built-in locking functionality. If you’ve worked with other content editors on a Sitefinity…

Read More

Using HandleUnknownAction in MVC Widgets

By | .NET, ASP.NET, C#, MVC, Sitefinity | No Comments

Sitefinity’s MVC widgets are fantastic. They allow untold amounts of customization and enable you to create an MVC framework as complex or as simple as you need. There is a caveat to using them, however: Because the controllers are typical ASP.NET MVC controllers, going to particular pages on your site might make them disappear! There is a simple workaround for this problem, and with this information you can ensure that your Sitefinity MVC widgets consistently display no matter what current state your web site is in. The Problem Say you have a simple custom MVC widget that has a single…

Read More

Accessing Sitefinity Roles in Code

By | .NET, C#, Sitefinity | No Comments

When developing custom solutions in your Sitefinity application, you may need the ability to work with Sitefinity roles. As a developer, you would reach out to the RoleManager that Sitefinity provides, and access the roles from there. However, you may run into an issue where some roles, verified to be a part of your site, are not represented when working with the RoleManager. This post goes into this issue, and shows how to access all Sitefinity roles to work with. Basic Role Access Let’s say you want to list all available Sitefinity roles on your web site. The natural idea…

Read More

Customizing Search Result URLs in Sitefinity

By | .NET, C#, Sitefinity | No Comments

One of Sitefinity’s many features is its search capabilities. Using Lucene under the hood, Sitefinity indexes your site content, both built-in content types and dynamic content types, along with static HTML, and allows you to present organized results to the user. You can customized what is and isn’t indexed among other things. Most of the time, Sitefinity is smart enough to create search result URLs that take you directly to the content in question. If you have “/my-news” as your news page, for instance, a particular article URL might look something like “/my-news/2015/1/1/my-article-url”. The search indexer automatically takes the page…

Read More

Working with Hybrid Forms in Sitefinity Widgets

By | .NET, C#, MVC, Sitefinity | No Comments

Throughout the course of web development, you often find yourself in a situation where you need data input from your user. Scenarios range from a simple contact form, to something as complex as a multi-part job application. In either case, Sitefinity offers multiple solutions. The easiest solution, for the simpler forms such as the aforementioned contact form, is to use Sitefinity’s built-in Forms capabilities. Much like with their pages, Sitefinity Forms provide a very simple, powerful way to create and customize even more complex forms for your site. The resulting data is then stored in Sitefinity, and can be set…

Read More

Relating Data in Sitefinity Content

By | .NET, C#, Sitefinity | No Comments

In my previous post discussing properties on custom content, I delved into some of the more complex types that can be properties, including classifications and related media. This post will get into the most complex type to work with: Related Data. This is taking existing custom content types and allowing other content types to have a property that relates one to the other. Relating data can happen with built-in content types (e.g. News), extend across other module builder modules, and even be self-referential! On top of all that, you can even create a custom content type that is the parent…

Read More

Complex Custom Properties for Sitefinity Content

By | .NET, C#, Sitefinity | No Comments

In my previous post I talked about basic access of custom properties in Sitefinity. Namely, strings and numbers. Those alone cover a lot of what you’d use when it comes to custom fields on built-in content types and custom content types. In this post, however, we’re delving into some of the more complex custom properties that can be associated with Sitefinity content. Like in the previous post, we’ll cover both how to query by a complex property (where applicable) and how to fetch the content of the complex property. Classifications (Tags, Categories, Custom) Fetching Tags and Categories within Sitefinity are…

Read More

Retrieving Simple Custom Properties from Sitefinity Content Items

By | .NET, C#, Sitefinity | No Comments

Sitefinity offers many extension points to its core content types, as well as letting you create completely customized content types of your own via the Module Builder. You can add custom fields to existing types like News and Events, or add as many fields as you like to custom content types. Working with these custom properties in code can seem a little daunting at first: How do you do it? What data types do you work with? Which methods do you call on your objects? There are several ways of accessing certain kinds of properties, while others you have to…

Read More

Extending Kendo UI Editor Functionality in Sitefinity

By | C#, JavaScript, Kendo UI, Sitefinity | One Comment

In my previous post I detailed a feature where users can upload files to the Sitefinity Document Library asynchronously. However, the interface for doing so was a bit basic. There was an HTML file input that automatically uploaded the selected file immediately. It worked, but the user wasn’t left with much to do with the link that was returned. Extending Kendo UI Editor functionality, however, can be used to make the return value more useful and make the whole user experience much better. This post will show you how to take the feature and add it to the set of…

Read More

How to Upload Files to your Sitefinity Document Library Asynchronously

By | .NET, ASP.NET, C#, JavaScript, Sitefinity, Web API | 2 Comments

Sometimes, it is necessary for users of your site to be able to upload files to Document Libraries in an asynchronous manner. They could be creating user-generated content and require a space to upload a file to reference in their content, for instance. Using some JavaScript and an ASP.NET WebAPI controller, we can accomplish this fairly simply. The HTML The first thing we’ll need is an input that allows users to select a file. This’ll be a simple HTML input the “file” type. You can put this HTML (along with the associated JavaScript) anywhere on the page, either via Content…

Read More

Storing Sitefinity Sites In Source Control

By | .NET, ASP.NET, C#, Sitefinity | 5 Comments

Issues with Content Management Systems and Source Control When developing a Sitefinity web site, you run into some challenges when it comes to properly storing your work in source control. Out of the box from its project manager, Sitefinity houses its references in the bin directory of the application so that a project build is not required to get it up and running. Being a content management system, a lot of changes occur in the site’s database. When developers want to put their Sitefinity site in source control and wish to collaborate, these sorts of issues can be difficult to…

Read More

Fix for Sitefinity Backend Search Bug when Removing Fields from Dynamic Content Types

By | Sitefinity | No Comments

I ran into an issue in Sitefinity recently, where removing a field from a custom content type caused made the backend search on that type fail. I reproduced this issue on a fresh Sitefinity site, to rule out any potential customizations or changes made in the project I discovered this bug in. Reproducing the Bug In a fresh 7.0.5100 Sitefinity install, I created a Speakers module, and a Speaker content type within that module: Then I created a couple Speakers, so I had something to search for. Searching for John Doe by email address (“example” in this case) yields the…

Read More