Sitefinity 4.1 SP1 Upgrade Considerations

Sitefinity 4.1 SP1 Upgrade Considerations

May 17, 2011 0 Comments

The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.

If you haven't already heard, the Sitefinity 4.1 SP1 has been released. It is an essential upgrade and we encourage all our customers to install this update as soon as possible.

For help upgrading, be sure to check the Sitefinity 4 upgrade documentation as well as this previous post: Upgrading Sitefinity 4 Websites.

Changes

Sitefinity 4.1 SP1 includes a few changes to be aware of before upgrading.

Content Module Fluent Mapping Changes

If you are using Fluent Mapping in your custom content-based modules, there is an important change that was made.The ContentBaseMetadataSource base class no longer implements a parameterless constructor which will cause an error if you attempt to build a content-based module project.

To fix this, in your derived class, instead of calling the removed constructor, call the default constructor with a null value.

Change this:

public MyModuleFluentMetadataSource() : base() { }

to this:

public MyModuleFluentMetadataSource() : base(null) { }

Your project should now build correctly.

Saving Configuration Changes

If you are using the API to add or remove elements from the various Sitefinity configuration files, you may notice that your changes are not automatically persisted. In addition, if you attempt to use the SaveChanges() method of the configuration manager you receive the following error:

This method is not supported by Telerik.Sitefinity.Configuration.ConfigManager. Please use SaveSection() instead.

Instead of calling SaveChanges(), you must instead call SaveSection() passing into it the section parameter that you're modifying. For example, the following code would remove a custom widget from the toolbox configuration.

var configMgr = ConfigManager.GetManager();
var config = configMgr.GetSection<ToolboxesConfig>();
var pageControls = config.Toolboxes["PageControls"];
var section = pageControls
       .Sections
       .Where<ToolboxSection>(e => e.Name == ToolboxesConfig.ContentToolboxSectionName)
        .FirstOrDefault();
if (section != null)
{
      // remove widget if it exists var widget = section.Tools.FirstOrDefault<ToolboxItem>(e => e.Name == "MyControl");
      if (widget != null) section.Tools.Remove(widget);
}
configMgr.SaveSection(config);

Lost Content After Upgrade

If after upgrading, your content is lost, or if you have duplicate controls that appear on the page that do not appear in edit mode, please review this KB article for a fix: Lost content after 4.1 upgrade

Duplicate Control IDs

After upgrading you may receive an error similar to the following:

Compiler Error Message: CS0102: The type 'ASP.sfpageservice_d12edd17_5884_46ab_a1bf_6d1f87e7b8aa_inforetail_aspx' already contains a definition for 'C000'

OR

Parser Error: The ID 'C001' is already used by another control.

For a fix, please see this KB Article: Duplicate control IDs after upgrading to Sitefinity 4.1

Your Feedback

As always we welcome your feedback and comments on your experiences upgrading Sitefinity via our Sitefinity 4 Discussion Forum.

progress-logo

The Progress Team

View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.

Comments
Comments are disabled in preview mode.
Topics
 
 
Latest Stories in
Your Inbox
Subscribe
More From Progress
New_Mobile_Dev_Ebook_Progress_Website_Thumbail
The New Mobile Development Landscape
Download Whitepaper
 
IDC Spotlight Sitefinity Thumbnail
Choosing the Right Digital Experience Platform to Improve Business Outcomes
Download Whitepaper
 
TheFastestWayToBuildMobileAppsArtboard-2
The Fastest Way to Build Mobile Apps With Cloud Data
Watch Webinar