Upgrading EPiServer CMS from version 7 to 7.5 – TinyMCE

Here’s a little note on how to upgrade EPiServer CMS 7.x to EPiServer CMS 7.5.

Bug in property settings for TinyMCE

When everything seemed to work properly after the update I discovered that Edit view occasionally seemed to stop working. The problem occurred when switching from on-page edit to all properties editing and EPiServer seemed to load for a endlessly long time. When I brought up the console window in Firebug I discovered that there where something wrong with the JavaScripts used by EPiServer CMS.

WidgetFactory: Could not resolve one or more widgets
http://www.mysite.com/Admin/Shell/7.7.0.0/ClientResources/epi/shell/widgets.js
Line 2

My first thought was that I was missing the latest version of the assemblies for the EPiServer UI, but after some investigation, deployment and configuration review I found out that everything seemed to be ok with the binaries and configuration for the web site. Another thing that indicated that everything was correct was that I did not find any direct information among the reported bugs that existed for EPiServer CMS. In other words, it was either an unreported bug or something with my settings.

Since I didn’t find a solution to my problem I let it be a little while, but being a developer means that it is hard to resist to fix broken things, so after a little bit of brainwork I found out that the problem ought to be in TinyMCE and its settings.

Solution

The problem where the custom property settings that I used for XHTML properties. By some reason the previous settings made TinyMCE stop working.

I solved the problem by creating a new property setting for the XHTML property in Admin Mode, and set it to be default for all XHTML properties. That solved my problem.

More information

You will find a list of solved bugs in EPiServer products here.
All current found bugs for EPiServer products can be found here.

Advertisements

Creating a MenuProvider in EPiServer CMS

EPiServer CMS 6 made it is possible to extend the main navigation that is being displayed in the user interface. Extending the navigation in EPiServer goes under the name Menu Providers and is one of the features in the OnlineCenter concept.

The code below is an example on how a menu provider could be implemented.

[SearchProvider]
public class MySearchProvider : ISearchProvider
{
    public string Area
    {
        get { return “My Area”; }
    }

    public string Category
    {
        get { return “Content Types”; }
    }

    public IEnumerable<SearchResult> Search(Query query)
    {
        var contentTypeRepo =
            ServiceLocator.Current.GetInstance<IContentTypeRepository>();

        return contentTypeRepo.List()
            .Where(a => a.Name.ToLower().Contains(query.SearchQuery))
            .Select(a => new SearchResult(“”, a.DisplayName, a.Description));
    }
}