Blog posts by Fredrik Tjärnberg2014-09-01T10:50:00.0000000Z/blogs/Fredrik-Tjarnberg/Optimizely WorldReleasing Beta Features/blogs/Fredrik-Tjarnberg/Dates/2014/9/Releasing-Beta-Features/2014-09-01T10:50:00.0000000Z<div>
<p>In order to get features out as early as possible and to get early feedback EPiServer will from time to time include features that are in “beta state” in our <a href="/link/d0fb45fcfe7e4d2e875444b6ca2cce2b.aspx">weekly deliveries</a>. By default beta features are hidden to prevent unintentional use (feature switching). Beta features are subject to change and will not follow semantic versioning as long as the feature is in beta state. Beta features are not covered by normal support. However, as one of the main objectives for publishing feature previews is to get feedback from the community, the development team will be active in responding to questions, issue reports and suggestions. Although a feature is in beta state we do production level quality assurance before it is integrated into release packages. It can be worth noting that we will support data migration for data related to a beta feature, between beta versions as well as between beta and official release which we hope will make the decision easier to try out new features early.</p>
<h2>How to Enable Beta Features</h2>
<p>To be able to work with beta features you need to have a role defined with the name “EPiBetaUsers”. This can be done in several ways, e.g. by adding a virtual role in in the virtual roles section of the configuration or by creating a role in Admin mode (if the current role provider supports it). The next thing is to add the users to this role. With this setup beta features will come to life. For developers working with the EPiServer platform, beta APIs will be accessible without any special configuration.</p>
</div>
<h2>How Beta Features Affect the UI</h2>
<p>UI components that are part of a beta feature are hidden if the user is not member of the EPiBetaUsers role. When beta features are shown to a user we will try to highlight the fact that it is a beta so that it is not used unintentionally.</p>
<h2>Beta APIs</h2>
<p>When we expose APIs for a beta feature this will be visible in Visual Studio intellisense as:</p>
<table border="1" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version. [<em>actual description</em>]</td>
</tr>
</tbody>
</table>
<p>As mentioned above, changes to APIs in a beta feature will never be considered breaking thus will not affect the major version of its containing package. This means that if you take a programmatic dependency on a beta API you might be required to do code changes even after minor version updates.</p>.NET 4.5 and the EPiServer platform/blogs/Fredrik-Tjarnberg/Dates/2014/7/NET-45-and-the-EPiServer-platform/2014-07-01T11:25:39.0000000Z<h4>Background</h4> <p>.NET 4.5 has been around for quite some time now and a lot of EPiServer projects are running on it already. In addition to .NET 4.5, there are two “dot” releases that supersedes it i.e. .NET 4.5.1 and 4.5.2. .NET 4.5 and its successors are in-place, backward compatible upgrades of .NET 4 which is the lowest version required by the EPiServer 7.5 platform. We have been limiting ourselves to stay on the .NET 4.0 version yet supporting .NET 4.5 leaving the decision to the partner project which version to build the solution on. Now we have come to a point where we think that new features in the EPiServer platform could really benefit from some of the things introduced in .NET 4.5. The most urgent one being the web socket support or more specifically SignalR which we want to use for building better user experiences.</p> <h4>What does this mean for someone taking a dependency on an EPiServer package?</h4> <p>Our plan for introducing this change is by updating our own dependencies to .NET 4.5 and ship that as a minor update i.e. 7.x. For a customer project this means that you will have a backward compatible update of the EPiServer packages which only need a recompilation after being updated. The only case where you need to do more is if your solution is deployed in a .NET 4.0 environment. In that case that environment needs to be upgraded to .NET 4.5 for the site to work.</p> <h4>How can you prepare?</h4> <p>The change is not that dramatic but if you want to be in the best position when this change comes we recommend building for .NET 4.5.2 right away. This forces the development, test and production environments to be prepared when the .net dependency version switch is integrated into the solution. If you are leveraging SignalR in your customer project we also recommend you to align that dependency to work with .NET 4.5. </p>CMS 6 R1 and R2 public API diff./blogs/Fredrik-Tjarnberg/Dates/2011/5/CMS-6-R1-and-R2-public-API-diff/2011-05-03T14:55:00.0000000Z<p>We have gotten a <a href="http://www.popkram.com/blog/2011/05/linkitemcollection-overrides-equals-in-cms-6-r2/">request</a> from Stefan Forsberg to publish a change log of API changes for CMS 6 R2. We are continuously running an internal tool to catch binary breaking changes before they are committed to our repository (as part of our <a href="http://msdn.microsoft.com/en-us/library/dd787631.aspx">gated check-in build</a>). In order to commit the change the problem needs to be fixed (remove the breaking change) or acknowledged. This removes unintentional breaking changes completely and also reduces intentional breaking changes to a minimum. An acknowledged API diff (marked as “Ignored” in our log) will end up in the release notes document. Note that we are only tracking signature changes (whether a signature (type or member) has been added or removed between two releases). Also note that our tool will not trap the change that was discussed in Stefan’s post since it is not binary breaking change.</p>
<p>So here it is: <a href="/link/6052eb4da8344a478bd47d7d14a773d2.zip">CMS 6 R2 API changes (compared with CMS 6).</a></p>
<p>We will look into improving the reporting for upcoming releases maybe using the proposed tool <a href="http://inca-app.com/">http://inca-app.com/</a>.</p>Important: Potential issues when upgrading to CMS6 R2/blogs/Fredrik-Tjarnberg/Dates/2011/4/Important-Potential-issues-when-upgrading-to-CMS6-R2/2011-04-13T09:44:00.0000000Z<p>Shortly after the release of CMS6 R2 we received a problem report describing issues when you upgrade a site that uses the “fetch data” feature. It turns out that there is a bug in one of the database upgrade scripts that results in loosing the reference to the fetched data page.</p>
<p>In an upgraded site affected pages will show up as empty pages. You can also verify if you are affected or not by executing the following SQL-query:</p>
<pre class="language-html"><code>select fkPageId from tblworkpage
where tblworkpage.linktype in (1,4)</code></pre>
<p>The above query returns a row for all pages that are configured to fetch data from another page or is a shortcut to another page. If this query returns any rows on your site (before or after upgrade) you need to take action.</p>
<h1>The cure</h1>
<p>You can do one of two things to recover from this.</p>
<ol>
<li>Download the SQL script below and save it in <strong><em>c:\Program Files x86\EPiServer\CMS\6.1.379.0\Upgrade\Database\sql </em></strong>(replace the old one) before performing the upgrade. </li>
<li>If you only have a few instances of pages that fetch data in the site and you have completed the upgrade it might be easier to manually go through the affected pages and set the fetch data reference once again. </li>
</ol>
<p><a href="/link/ef0c8b0e5d5c428dae574c8e6d811bee.sql">Download the updated script here</a>.</p>
<p>We apologize for any inconvenience this may have caused.</p>Improvements in CMS6 R2 – not only new features/blogs/Fredrik-Tjarnberg/Dates/2011/1/Improvements-in-CMS6-R2--not-only-new-features/2011-01-04T14:30:00.0000000Z<p><a href="http://world.episerver.com/Blogs/Allan-Thran/Dates/2010/11/EPiServer-CMS-6-Release-2/">A number of new features have been announced</a> being part of the upcoming CMS 6 R2 release. Apart from features you will also be able to enjoy a whole lot of fixed bugs. We continuously work on fixing issues in existing functionality i.e. issues that are reported by the community and issues that we find internally. Currently the bugs that will have a cure in the R2 release sum up to 273. A lot of those (223) are also part of the <a href="http://world.episerver.com/Download/Items/EPiServer-CMS/Version-6/EPiServer-CMS-6-R2-Beta/">CMS6 R2 Beta release</a> that was made available for the public just before Christmas. Take a look at the <a href="http://bugs.episerver.com" target="_blank">bug list</a> to see which bugs have been fixed in the Beta. If there are issues that you know about that can’t be found in bug list we want to know about it as soon as possible to be able to resolve it before shipping CMS 6 R2.</p>Generic overloads of GetPage and GetChildren - To be or not to be?/blogs/Fredrik-Tjarnberg/Dates/2010/1/Generic-overloads-of-GetPage-and-GetChildren---To-be-or-not-to-be/2010-01-25T23:37:44.0000000Z<p>Joel Abrahamsson <a href="http://joelabrahamsson.com/entry/a-plea-to-the-episerver-backend-team">put some light on some issues</a> with the newly added generic overloads GetPage and GetChildren on DataFactory as well as the generic overload of ShallowCopy on PageData. These APIs were added mainly to give developers a way to hook in their own PageData implementation in a simple way which was used by the <a href="http://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/2009/5/Page-Type-Tool---Strongly-Typed-Properties/">PageTypeTool</a> and was mentioned by Daniel Rodin in his blog post <a href="http://labs.episerver.com/en/Blogs/Daniel-Rodin/Dates2/2009/7/Working-with-your-own-PageData-types-in-CMS5-R2-SP2/">Working with your own PageData types in CMS5 R2 SP2</a>. However, as the use of these methods have been somewhat outdated by the introduction of <a href="http://pagetypebuilder.codeplex.com/">PageTypeBuilder</a> and as we agree with Joel’s feedback, we are now considering a removal of these APIs by the release of CMS 6.</p> <p>Our only remaining concern is backward compatibility which is something we struggle to maintain as much as possible (even if we are shipping a new major version).  However our qualified guess (after all we can only guess) is that the adoption of these methods are not that widely spread. If we also take into account that we can create extension methods that replaces all but one of the APIs planned to be cut we think it should be rather safe to get rid of the methods in CMS 6. If you disagree, continue reading.</p> <p>The signatures that are at stake:</p> <p>On<strong> EPiServer.DataFactory</strong>:</p> <table border="1" cellspacing="0" cellpadding="2" width="539"><tbody> <tr> <td valign="top" width="537"> <p><font size="1" face="Lucida Console">public IEnumerable<T> GetChildren<T>(PageReference pageLink) <br />where T: PageData, new();</font></p> </td> </tr> <tr> <td valign="top" width="537"> <p><font size="1" face="Lucida Console">public IEnumerable<T> GetChildren<T>(PageReference pageLink, ILanguageSelector selector) <br />where T: PageData, new();</font></p> </td> </tr> <tr> <td valign="top" width="537"> <p><font size="1" face="Lucida Console">public T GetPage<T>(PageReference pageLink) <br />where T: PageData, new();</font></p> </td> </tr> <tr> <td valign="top" width="537"> <p><font size="1" face="Lucida Console">public T GetPage<T>(PageReference pageLink, ILanguageSelector selector) <br />where T: PageData, new();</font></p> </td> </tr> </tbody></table> <p>On <strong>EPiServer.Core.PageData</strong>:</p> <table border="1" cellspacing="0" cellpadding="2" width="540"><tbody> <tr> <td valign="top" width="538"><font size="1" face="Lucida Console">public static T ShallowCopy<T>(PageData copy) <br />where T: PageData, new();</font></td> </tr> </tbody></table> <h2> </h2> <h2>Objections anyone? </h2> <p>We are now interested to hear if there are anyone that strongly disagrees with the suggested change.</p> <p>Is there anyone out there that uses the APIs listed above? </p> <p>If yes, would it be sufficient for you to replace the DataFactory changes with equivalent extension methods with the same signature and same semantics?</p> <p>Please, post a comment here or drop me a mail (fredrik [dot] tjarnberg [at] episerver [dot] com).</p>The lost EPiServer.TypedPageBase<PageData>/blogs/Fredrik-Tjarnberg/Dates/2009/8/The-lost-EPiServerTypedPageBasePageData/2009-08-18T09:43:55.3530000Z<p>When CMS 5 R2 SP2 was in RC, it included a type to simplify using your own PageData types when building page templates. Before the release we decided to remove this class for two reasons: naming and whether or not it is OK to hide the CurrentPage property of PageBase (I think it is, btw). </p> <p>What should you do if you need this type in your EPiServer project? </p> <p>For those using the <a href="http://pagetypebuilder.codeplex.com/">PageTypeBuilder project</a> there is a replacement that should be used instead, TemplatePageBase.</p> <p>However, if you for some reason still want to use the original TypedPageBase here’s the code.</p> <p> </p><div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:4efe698d-df98-4d4a-9306-4d4ef34acdd8" class="wlWriterEditableSmartContent"><pre style="background-color:Silver;overflow: auto;"><span style="color: #0000FF;">using</span><span style="color: #000000;"> System;
</span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Collections.Generic;
</span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Linq;
</span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Text;
</span><span style="color: #0000FF;">using</span><span style="color: #000000;"> EPiServer.Core;
</span><span style="color: #0000FF;">using</span><span style="color: #000000;"> EPiServer.Web.PageExtensions;
</span><span style="color: #0000FF;">namespace</span><span style="color: #000000;"> EPiServer
{
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> Page Template class for supporting strongly typed PageData objects with an arbitrary type </span><span style="color: #808080;"><typeparamref name="TPageData"/></span><span style="color: #008000;">.
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"></summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><typeparam name="TPageData"></span><span style="color: #008000;">The strongly typed PageData type.</span><span style="color: #808080;"></typeparam></span><span style="color: #808080;">
</span><span style="color: #000000;"> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> TypedPageBase</span><span style="color: #000000;"><</span><span style="color: #000000;">TPageData</span><span style="color: #000000;">></span><span style="color: #000000;"> : PageBase
</span><span style="color: #0000FF;">where</span><span style="color: #000000;"> TPageData : PageData, </span><span style="color: #0000FF;">new</span><span style="color: #000000;">()
{
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> Creates a new instance of </span><span style="color: #808080;"><see cref="TypedPageBase"/></span><span style="color: #008000;"> with a default set of features enabled.
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"></summary></span><span style="color: #808080;">
</span><span style="color: #000000;"> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> TypedPageBase() : </span><span style="color: #0000FF;">this</span><span style="color: #000000;">(
SiteRedirect.OptionFlag </span><span style="color: #000000;">|</span><span style="color: #000000;">
ContextMenu.OptionFlag </span><span style="color: #000000;">|</span><span style="color: #000000;">
PageStatistics.OptionFlag </span><span style="color: #000000;">|</span><span style="color: #000000;">
SaveCurrentPage.OptionFlag, </span><span style="color: #800080;">0</span><span style="color: #000000;">) { }
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> Creates a new instance of </span><span style="color: #808080;"><see cref="TypedPageBase"/></span><span style="color: #008000;"> where individual features can be enabled and disabled.
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"></summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><param name="enable"></span><span style="color: #008000;">The bitmask for enabling certain features.</span><span style="color: #808080;"></param></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><param name="disable"></span><span style="color: #008000;">The bitmask for disabling certain features.</span><span style="color: #808080;"></param></span><span style="color: #808080;">
</span><span style="color: #000000;"> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> TypedPageBase(</span><span style="color: #0000FF;">int</span><span style="color: #000000;"> enable, </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> disable) : </span><span style="color: #0000FF;">base</span><span style="color: #000000;">(enable, disable) { }
</span><span style="color: #0000FF;">private</span><span style="color: #000000;"> TPageData _currentPage;
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> Gets a strongly typed PageData of type </span><span style="color: #808080;"><typeparamref name="TPageData"/></span><span style="color: #008000;">.
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"></summary></span><span style="color: #808080;">
</span><span style="color: #000000;"> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">virtual</span><span style="color: #000000;"> TPageData CurrentTypedPage
{
</span><span style="color: #0000FF;">get</span><span style="color: #000000;">
{
</span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (_currentPage </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">)
{
_currentPage </span><span style="color: #000000;">=</span><span style="color: #000000;"> PageData.ShallowCopy</span><span style="color: #000000;"><</span><span style="color: #000000;">TPageData</span><span style="color: #000000;">></span><span style="color: #000000;">(</span><span style="color: #0000FF;">base</span><span style="color: #000000;">.CurrentPage);
}
</span><span style="color: #0000FF;">return</span><span style="color: #000000;"> _currentPage;
}
}
}
}
</span></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin. http://dunnhq.com --></div>
<p>In the latest version of <a href="http://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/2009/5/Page-Type-Tool---Strongly-Typed-Properties/">Page Type Tool</a> the corresponding generated code looks like this:</p>
<p>
</p><div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:f4984a40-81cb-46b0-bdaa-7aa28479a2ae" class="wlWriterEditableSmartContent"><pre style="background-color:Silver;overflow: auto;"><span style="color: #000000;"> </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> A base class for page template implementations.
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"></summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><typeparam name="TPageData"></span><span style="color: #008000;">A PageData class that will represent the content class for the page template.</span><span style="color: #808080;"></typeparam></span><span style="color: #808080;">
</span><span style="color: #000000;"> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> PageBase</span><span style="color: #000000;"><</span><span style="color: #000000;">TPageData</span><span style="color: #000000;">></span><span style="color: #000000;"> : EPiServer.PageBase
</span><span style="color: #0000FF;">where</span><span style="color: #000000;"> TPageData : EPiServer.Core.PageData, </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> ()
{
</span><span style="color: #0000FF;">private</span><span style="color: #000000;"> TPageData _currentPage;
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> Creates an instance of the PageBase type.
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"></summary></span><span style="color: #808080;">
</span><span style="color: #000000;"> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> PageBase() :
</span><span style="color: #0000FF;">this</span><span style="color: #000000;">((EPiServer.Web.PageExtensions.SiteRedirect.OptionFlag
</span><span style="color: #000000;">|</span><span style="color: #000000;"> (EPiServer.Web.PageExtensions.ContextMenu.OptionFlag
</span><span style="color: #000000;">|</span><span style="color: #000000;"> (EPiServer.Web.PageExtensions.PageStatistics.OptionFlag </span><span style="color: #000000;">|</span><span style="color: #000000;"> EPiServer.Web.PageExtensions.SaveCurrentPage.OptionFlag))), </span><span style="color: #800080;">0</span><span style="color: #000000;">)
{
}
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> Creates an instance of the PageBase type with specified page feature configuration.
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"></summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><param name="enable"></span><span style="color: #008000;">The page options to enable.</span><span style="color: #808080;"></param></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><param name="disable"></span><span style="color: #008000;">The page options to disable.</span><span style="color: #808080;"></param></span><span style="color: #808080;">
</span><span style="color: #000000;"> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> PageBase(</span><span style="color: #0000FF;">int</span><span style="color: #000000;"> enable, </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> disable) :
</span><span style="color: #0000FF;">base</span><span style="color: #000000;">(enable, disable)
{
}
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"><summary></span><span style="color: #008000;">
</span><span style="color: #808080;">///</span><span style="color: #008000;"> Gets page data for the current page.
</span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;"></summary></span><span style="color: #808080;">
</span><span style="color: #000000;"> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> </span><span style="color: #0000FF;">virtual</span><span style="color: #000000;"> TPageData CurrentPage
{
</span><span style="color: #0000FF;">get</span><span style="color: #000000;">
{
</span><span style="color: #0000FF;">if</span><span style="color: #000000;"> ((</span><span style="color: #0000FF;">this</span><span style="color: #000000;">._currentPage </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">))
{
</span><span style="color: #0000FF;">this</span><span style="color: #000000;">._currentPage </span><span style="color: #000000;">=</span><span style="color: #000000;"> EPiServer.Core.PageData.ShallowCopy</span><span style="color: #000000;"><</span><span style="color: #000000;">TPageData</span><span style="color: #000000;">></span><span style="color: #000000;">(</span><span style="color: #0000FF;">base</span><span style="color: #000000;">.CurrentPage);
}
</span><span style="color: #0000FF;">return</span><span style="color: #000000;"> </span><span style="color: #0000FF;">this</span><span style="color: #000000;">._currentPage;
}
}
}
</span></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin. http://dunnhq.com --></div>
The most notable difference is the type name and that it hides the CurrentPage property implementation of the base class.Installing Demo Templates on CMS 5 R2 SP2 – Another Recipe/blogs/Fredrik-Tjarnberg/Dates/2009/6/Installing-Demo-Templates-on-CMS-5-R2-SP2--Another-Recipe/2009-06-25T21:47:00.0000000Z<p>CMS R2 SP2 will be here any day now. Once you have it you will find that your favorite module does not exist in a compatible version… hmm. This is a problem we are eager to solve since it puts quite some pressure on the EPiServer organization whenever a new CMS version is released.</p> <p>In the mean time, what can you do to get around this, i.e. to get a module built for an older version (R2 or R2 SP1) installed on your brand new R2 SP2 site. Well, here’s a walkthrough of how you get the Demo templates for SP1 working and the same procedure should work for most “ordinary” modules:</p> <ol> <li>Make sure the necessary components are installed on the machine (If you don’t have the installation bits you can download them from <a href="http://world.episerver.com/en/Download/Categories/Products/EPiServer-CMS/">EPiServer World</a>). <ol> <li>EPiServer CMS R2 SP1. (Needed to be able to install Demo Templates on the machine) </li> <li>Demo Templates for R2 SP1. </li> <li>EPiServer CMS R2 SP2. </li> </ol> </li> <li>Install an SP2 site. </li> <li>Select <strong>Install Demo Templates for SP1</strong> (found under the SP1 node in the tree (5.2.375.133)). </li> <li>In the next step you will be asked which features of the Demo Templates to install. </li> <li>You will now be prompted to select a site where to install the module but you won’t find your SP2 site. </li> <li>Select the brand new <strong>Show All Sites</strong> checkbox in the upper right corner of the wizard. <br /><a href="/link/5f468c725df049d8b3e0764d6c5880f6.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="/link/89a67e389e06436fbe2812ca8f009b82.png" width="195" height="198" /></a> </li> <li>After a small alert, all sites on the local IIS will be shown and you can select the SP2 site you just created. </li> <li>Go ahead and complete the wizard. </li> <li>Your done!</li> </ol> <p>I tested the above steps to install composer Composer 3.2.5 for SP1 as well but did not manage to get it working completely. I can’t really tell if it is me or it actually is something that needs to be updated for CMS 5 R2 SP2 to work. Composer experts go ahead and try yourself and feel free to comment on this post.</p>Module Installation – Dealing with Regrets/blogs/Fredrik-Tjarnberg/Dates/2009/6/Module-Installation--Dealing-with-Regrets/2009-06-15T18:08:00.0000000Z<p>If you’re an above average, EPiServer module installer developer you might have experienced writing a custom wizard for retrieving data. When doing so you take on a responsibility to handle cancellation, not only for your own script but for any script that is calling you (“install site with sql database” being one). This is easy to forget… I know from personal experience. The good news is that it is very easy to handle the event of user regrets (canceling your wizard) and here’s how":</p>
<p>In your PS script when calling the Show method on the wizard you need to get capture the return value. <br /></p>
<div id="codeSnippetWrapper"><pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id="codeSnippet">$proceedWithInstall = $wizard.Show()</pre><br />In order to terminate any active installer transactions you then need to look at the return value and if it’s false, you simply throw an exception to cause active transactions to rollback</div>
<div> </div>
<div id="codeSnippetWrapper"><pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id="codeSnippet"><span style="COLOR: #0000ff">if</span> ($proceedWithInstall -eq $<span style="COLOR: #0000ff">false</span>)<br />{<br /> <span style="COLOR: #0000ff">throw</span>(New-Object ApplicationException(<span style="COLOR: #006080">"User cancelled the installation"</span>))<br />}</pre><br />Not doing the above will make the surrounding script (Install site…) complete as if nothing happened.</div>EPiServer CMS 5 R2 in Visual Studio 2010http://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/2009/5/EPiServer-CMS-5-R2-in-Visual-Studio-2010/2009-05-27T02:10:46.0000000ZIn the beginning of 2008 I posted a blog about getting the Visual Studio integration built for VS 2005 worging in VS 2008 . Now that VS 2010 is in beta status it’s time for another one. Here’s what you need to do to make the Visual Studio tools fo...Page Type Tool - Strongly Typed Propertieshttp://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/2009/5/Page-Type-Tool---Strongly-Typed-Properties/2009-05-23T03:38:17.0000000ZThere has been quite some buzz in the “EPiSphere” around the property framework lately. It turns out that a lot of smart people has spent time on finding the way to strongly typed properties in EPiServer…. and so have I. Back in March I posted the...EPiServer CMS 5 R2 SP2 RChttp://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/2009/5/EPiServer-CMS-5-R2-SP2-RC/2009-05-22T19:14:20.0000000ZWe are continuously doing maintenance work on existing releases to avoid building up a bug backlog. We now have ~ 115 bugs that has been fixed for CMS 5 R2 that we want to make available for our customers in the SP2 release. For the first time we...Statistics log about to be obsoletedhttp://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/2009/4/Statistics-log-about-to-be-obsoleted/2009-04-29T15:54:56.0000000ZThis post is to notify the EPiServer developer community about planned changes to the Statistics log that’s been part of EPiServer CMS since 4.50. The statistics log functionality contained in the EPiServer.LogService.exe, EPiServer.Log.Core.dll a...Planned breaking changes in CMS 5 R3http://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/2009/3/Planned-breaking-changes-in-CMS-5-R3/2009-03-13T11:45:41.0000000ZI have been focusing a lot on change control lately to improve the upgrade experience for our customers and partner developers. One part of this is to trap binary breaking changes automatically. For this I have added a custom tool (MSBuild task) t...PageType Inheritancehttp://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/2009/3/PageType-Inheritance/2009-03-10T12:31:21.0000000ZI have been spending some late nights on a tool for providing inheritance like relations between PageTypes. PageType inheritance is one of the most frequent requests from the EPiServer developer community that’s been around… well basically......When a UI needs a cheat sheethttp://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/2009/2/When-a-UI-needs-a-cheat-sheet/2009-02-17T23:30:07.0000000ZBeing the janitor of our source code repository (Team Foundation Server 2008), I run into the conflict resolution dialog quite frequently. When resolving one item at a time you will be presented with the options to Merge changes for me Merge chang...Module installation for R2 SP1http://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/2009/2/Module-installation-for-R2-SP1/2009-02-11T18:38:39.0000000ZIf you are creating modules for EPiServer CMS and been adopting your module for R2 SP1 you have probably noticed that there has been a few changes in terms of  deployment in the latest release. Moved PowerShell CmdLets The most significant change ...Module Installation EPiServer CMS 5 R2 - Getting started.http://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/112488/12/Module-Installation-EPiServer-CMS-5-R2---Getting-started/2008-12-02T02:39:13.0000000ZSince the new model for installing EPiServer applications and modules has changed quite a bit since the good old EPiServer Manager days describing module installation in just a blog post will not be sufficient so my goal with this posting is getti...The threat of public humiliation improves software quality.http://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/112488/11/The-threat-of-public-humiliation-improves-software-quality/2008-11-28T10:40:27.0000000ZIt took three days to get all our builds working after Per installed screens for presenting the current build status. If you use Team Build you can use the same build status utility that we use. For the curious, the screen displays the following...What's in the EPiServer PowerShell Snapin?http://labs.episerver.com/en/Blogs/Fredrik-Tjarnberg/Dates/112488/10/Whats-in-the-EPiServer-PowerShell-Snapin/2008-10-01T23:21:05.0000000ZThe "R2" installation story relies heavily on PowerShell and a PowerShell extension ("Snapin") for EPiServer that we use for manipulating just about anything related to the configuration of an EPiServer site. So, what if you want to craft your own...