help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

Upgrading to AxCMS.net 8.6.0

 

Highlights

  • AxSite object - new way to identify sites;
  • Read Right - you can now restrict users read objects;
  • Page & Navigation cloning - these are new processes;
  • AxLanguage refactorings - CMS manager is gone from configuration, only one custom manager will be available from now on.

AxSite object and Navigation handling

Read about AxSite [here].

Navigation context - CurrentSite

New property is available in navigation context "NavigationContext.CurrentSite", which returns currently active site(it will be automatically detected by handler or authentication module for you).

Changes in CreateApp

During upgrade you are required to modify your create application.

  1. Find call of method DeleteTables(...) in [PROJECT_NAME]Application.cs (e.g. C:\Projects\AxCMS_PremiumSample\Create_PremiumSample\PremiumSampleApplication.cs);
  2. Add "AxSite" table to the list of tables.

Overridden overview filter

If you overrided any of filters on overview pages in AxCMS.net, then you will probably get an exception on it, after upgrade. Reason is behind new properties that were added to simple & expert filters.

You have to replace next lines to simple filter(ID:filtergeneralPagesPanel) panel:

            <tr>
                <td>
                <asp:TextBox runat="server" id="_searchTermTextBox" MaxLength="255" Width="100%" />
                 </td>
            </tr>

With these lines:

            <tr>
                <td>
                <asp:TextBox runat="server" id="_searchTermTextBox" MaxLength="255" Width="100%" />
                <AxLanguage:TranslateFirstItemDropDownList runat="server" ID="_siteSimpleDropDownList" AutoPostBack="true" Width="100%" />
                 </td>
            </tr>

You have to add next lines to expert filter panel(ID:filterexpertPagesPanel) into main property table. You can choose different place for AxSite filter, but usually it's second row:

            <tr>
                <td><asp:Literal runat="server" ID="Literal9">Site</asp:Literal>:</td>
                <td><AxLanguage:TranslateFirstItemDropDownList runat="server" ID="_siteExpertDropDownList" style="width: 100px;" /></td>
            </tr>

Extendable Clone Processes

You can easily extend page and navigation cloning processes by creating custom class in your project bussiness logic assembly, extend clone class and add attribute to it.

Page clone:

  • Parent class : PageCloneProcess
  • Override attribute : [OverridesPageCloneProcess]

Navigation clone:

  • Parent class : NavigationTreeCloneProcess
  • Override attribute : [OverridesNavigationTreeCloneProcess]

For more information about what method should be overridden to apply your logic, please read from AxCMS.net class reference [here].

New "Copy tree" UI and functionality

Copy now allows you to create sites to the destination, physically create new pages, relate to newly created page, separately copy document and/or page assignments. There is no more "CopyTree" SQL procedure which took care of navigation copy. All cloning processes now flow in C# code and can be extended or changed by developers. All you need is to override needed class as described previously. If you had extended this SQL procedure for you custom needs, then please remove it from solution and stop using it.

Service transaction, MS SQL tweak

As we moved logic of copy and cloning navigation to codebehind, to avoid timeouts for longer operation we introduced "start operation as service task" function which allow user schedule service task and perform clone operation on background. This operation should be run in transaction, which will allow to restore previous state in case of clone operation failure. If your operation will need to get done a huge job with lot of data, then you will probably mark that it's not possible to use Managment System while service perform operation. To fix that you should allow to create and read commited snapshots to MS SQL (minimum version required - 2005) server. If you don't to allow this options, please remove query for setting them on in update scripts. Be aware that clone operation will freeze whole Managment System work during service work.

Read more about snapshots here.

Single ResourceManager for all purposes

Starting from this version there is no possibility to change any settings of "CMS" resource manager. It can be deleted from configuration files (it will not fail if such xml node exists, but all the changes in settings will be skipped). If you want to call "CMS" resource manager to retrieve any translations, then please use singleton factory ResourceManagerFactory.GetCMSManager(). This way you can only retrive translations from AxCMS.net translation base.

Besides that AxCMS.net is not restricted to allow only one resource manager to be used for project specific translations (inserts will go to single manager in configuration or first one in the list which is not "CMS"). However you can still have multiple resource managers and call them by using "ResourceManagerFactory" singleton class.

As there is no need to specify resource manager, you could remove all "ResourceManagerFactory.GetManager("[MANAGER_NAME]")" from the code and replace them with "GetManager()" or if you want to query "CMS" manager, then please use "GetCMSManager()" method for that.

Changes in TemplateBase, caused by AxSite and ResourceManager refactoring

As there is no more need to specify resource manager that will translate page, some changes were done also in templates.

  1. "ResourceManagerName" property was removed from "TemplateBase" class. You will have to remove this override in custom templates;
  2. Exact language to which current page will be translated, will be detected automatically. Template will find AxSite to which this page is assigned and try to translate it into the language from Axsite properties.

If you still need to do something tricky with setting a "CurrentUICulture", then you can always override "InitTemplate" method and set culture after base method.

NB! To retrieve information about current language is used country assigned with some page, you can always use "NavigationContext.CurrentSite" and get information you need. Remember that AxCMS.net supports even non standard cultures (you can read about that in previous upgrade).

Changes in mail and newsletter sending

During newsletter or mail send out you will not be asked to pass ResourceManager as parameter. This will let CMS take care about manager selection. Method with resource manager parameter exists for backward compatibility, but marked as obsolete since there is no effect of passing this parameter to the method.

Read Right and upgrade

Since this version new right type is introduced - Read. This allows to check rights for reading elements. Very useful on overview pages, which will not show you elements in the list for which you don't have Read right. Same for the navigation tree - elements without right will not be shown in the tree.

Please make sure you have updated your permission matrix with newest one. It lets you understand better the idea of the new right type.

Change scripts for this version will add read right for all existing users in the system to all categories and navigations. Please make sure to double check read right if elements will not show up after login.

Adding more security into Forms authentication

If you had custom development of user authentication control, but used standard functionality to store information with "Forms" authentication method using AxCMS.net, then you probably should re-check your controls, as we hold user GUID in the authentication cookie from now on. Previoiusly we stored username that was potentially unsecure.

Make sure you have GUIDs for all user in both MS and LS. E.g. by executing
update axusers set guid=lower(replace(newid(),'-','')) where guid is nullin both MS and LS databases.

Also make sure to provide GUID to forms authentication in your LiveLogin. E.g. by replacing line
            FormsAuthentication.SetAuthCookie(username, false);with
            AxUser user = (AxUser)(new AxUserAdapter()).LoadByName(username);
            FormsAuthentication.SetAuthCookie(user.Guid, false);

Import user activity
It is now possible to override new methods in import user activity: "DoCSVImport" and "DoXMLImport". The need comes from giving ability to customize import process when it is not possible solve with standard methods (eg. x64 machines don't have normal ODBC provider, like Microsoft Jet).

TinyMCE and HtmlRules

To enable text font coloring and background coloring in TinyMCE you have to enable tag "span" with attribute "style". This is only required tag and attribute for this two options from now on. Previously you had to allow "font" tag then attribute "color" enabled text coloring and/or attribute "style" enabled text background coloring.

Another change is about alignment of text. Previously you had to add attribute "align" for the tag "p" for allowing alignment. New editor uses "style" attribute for alignment of text. So, now alignment options will show up if attribute "style" allowed for tag "p".