help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

Upgrading to AxCMS.net 9.2.0

 

Intermediate Release AxCMS.net 9.2
is available exclusively for
AxCMS.net Solution Providers.

AxCMS.net Solution Provider Program

CommonObject is gone

Due to a bigger refactoring in the persistence of the content, the class CommonObject is eliminated. Use the extension methods in IAxControl.

In your code please replace for example:

CommonObject.DeleteDB(control)

with

control.DeleteDB();

TemplateRootDir is required for PublishService

Add the key TemplateRootDir to the web.config of Publish Services:

<add key="TemplateRootDir"
value="C:\Projects\AxCMS_PremiumSample\AxCMSTemplates_PremiumSample\"
/>

From AxCMS.net 9.2 image formats definition is needed for the publish service to treat the documetns correctly. This information is available only from CmsSite.xml. Previously it was not needed for the publish service to access CmsSite.xml.

ActiveDirectory Synchronization

If you want to automatically synchronize AD user membership and status when user log ins, add this key to the web.config of MS:

<add key="ADSyncMembershipOnLogin" value="1"
/>

This helps to prevent desynchronization of AD group membership and AxCMS.net group membership. For example, when user is removed from AD group, it will be removed from AxCMS.net group automatically.

It is also possible to schedule a Service Task that will do full synchronization. Running following SQL script on MS database will schedule a daily full synchronization:

INSERT INTO [AxServiceTask]
(AxID,Active,ClassName,AssemblyName,Parameters,ExecutionInterval)
VALUES
(2,1,'Axinom.AECMS.UserManagement.ImportAxUsersFromADTask','AxCMS.BL','',86400)
 

Groups for Structure Elements

If you want to leverage the new possibility to group structure elements, you should create the groups in CmsSite.xml. You do it with a new XML-element ElementGroupDefinitions:

    <ElementGroupDefinitions>
        <ElementGroupDefinition axid="Formular" name="Formular controls">
            <ElementTemplates>
                <ElementTemplate axid="dyn_1001" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1002" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1003" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1004" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1005" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1006" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1007" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1008" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1009" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1010" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1011" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1012" atLeast="0" atMost="100"/>
            </ElementTemplates>       
        </ElementGroupDefinition>
    </ElementGroupDefinitions>

In a placeholder you can allow the whole group instead of particular element:

<PlaceholderDefinition axid="basePlaceholder">
    <ElementTemplates>
        <ElementTemplate axid="GreyCellLine" atLeast="0" atMost="2"/>
        <ElementTemplate groupID="Formular" atLeast="0" atMost="100"/>
        ...

If you omit this step, everthing works as it used to be, you just don't see groups in the toolbar while inserting a structure element.

Configuring Publish Agent to Activate Pre-Publishing

To use Pre-Publishing (publishing to the Pre-Live system):

  • Setup another instance of the Live System (incl. Live DB and Publish Service)
  • Add additional Publish Agent to the web.config of the MS pointing it ot the new Publish Service
  • Add attribute Straging=true to activate Pre-Publish functionality for this Publish Agent

<PublishAgent mode="on" type="WebService" Staging="True">

Please contact us if you are planning to use this feature.

AxMetaTags control

AxCMS.net 9.2 introduces new standard control for rendering page meta tags - AxMetaTags. The control renders page title, meta tags assigned to the page and favicon assigned to the site.

Before 9.2 users had to use metatag control from template project. This approach is still valid, but to benefit from the standard control, do the following steps:

- remove old metatag control from your templates. E.g. in Premium Template Project, remove the lines <Sample:AxMetaTags id="metaTagsControl" runat="server" /> and <%@ Register TagPrefix="Sample" TagName="AxMetaTags" Src="~/templates/Controls/AxMetaTags.ascx" %> from BaseTemplate.aspx, FlexibleTemplate.apsx, HomepageTemplate.aspx, VerticalTemplate.aspx.

- in your base template Page_Load method add insertion of the new AxMetaTag control or its override. E.g. in Premium Template Project, add if(headTag!=null) headTag.Controls.Add(new AxMetaTags()); in PremiumSampleBaseTemplate.Page_Load() method. Alternatively, you can add the control in all template aspx pages by adding the registration line (if you do not have it yet) <%@ Register TagPrefix="Axinom" Namespace="Axinom.AECMS.WebControls" Assembly="AxCMS.BL"  %> and then add control to the header <Axinom:AxMetaTags id="metaTagsControl" runat="server" />

- you can also override the control to add your own logic. E.g. to keep current Premium Template meta tag functionality (page transition effects and browser compatibility metatag), create following class:

    public class PremiumSampleMetaTags : AxMetaTags
    {
        protected override void AddContent()
        {
            base.AddContent();
            //add for having slight redirect between pages
            if (!CMSConfigurationSettings.IsAxCMS)
            {
                // fix for IE8 - enable IE7 emulation and disable transition effects
                if (Request.Browser.Type == "IE8")
                {
                    _metaTags.Text += MetaTagStruct.FormatMetaTag("X-UA-Compatible", "IE=EmulateIE7", true);
                }
                else
                {
                    _metaTags.Text += MetaTagStruct.FormatMetaTag("Page-Enter", "blendTrans(Duration=0.2)", true);
                    _metaTags.Text += MetaTagStruct.FormatMetaTag("Page-Exit", "blendTrans(Duration=0.2)", true);
                }
            }
        }
    }
 Then replace the control registration in PremiumSampleBaseTemplate.Page_Load().