«No parameterless constructor defined for this object.» exception after upgrade to Episerver CMS 11

After upgrading a site from CMS 10 to CMS 11 I was faced by this exception:
No parameterless constructor defined for this object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.MissingMethodException: No parameterless constructor defined for this object.

Edit and admin mode works, but every page returns this YSOD (yellow screen of death) exception page.

In the middle of the list of breaking changes for CMS 11 there is a clue:

It is no longer supported to get an ILogger instance from IOC container.

In every page controller, I had:

private readonly ILogger _log;

public DefaultPageController(ILogger logger)
{
   _log = logger;
   ---
}

Replacing this with:

private readonly ILogger _log = LogManager.GetLogger();

public DefaultPageController()
{
   ---
}

…resolves the issue.

Episerver pagetree search shows encoded html entities after upgrading to the new UI

Episerver first released their new refreshed editor ui with version 11.21.0 of Episerver.CMS.UI in June. Due to unintended semantic breaking changes this was (pretty silently) removed from the public nuget feed after a few days.

Weeks, and months, has passed. The refreshed ui has been released (again) and after numerous bug fixes, I finally agreed to update the website for a customer eager to try the new stuff.

Read more →

DropDownList in on-page editing?

The attributes [SelectOne] and [SelectMany] can be used in combination with a SelectionFactory to create Episerver properties in the form of DropDownLists and CheckBoxLists. This was introduced in Episerver 7.5, five years ago, and should be familiar to most Episerver developers. But, some editors are afraid of «All properties view» and would like to do all their editing in «On-page editing», what about them? They need a little extra work.
Read more →

Change text in the Episerver UI

Sometimes the names and texts in the Episerver UI can be confusing for the editors of a specific site. Luckily, we as developers can override all texts stored in Episervers language files, in two easy steps.

  1. Locate the text you want to override
  2. Add your own translation to an XML file

Read more →