Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASCX Web Controls are not stored in Database

Recently we have upgraded to Tridion 2011 SP1 from Tridion 5.3.

In our existing implementation we have various Dynamic Component Templates. For few CTs output format is ASCX Web Control for few CTs output format is HTML Fragment.

After publishing we came across 1) ASCX WebControls are NOT stored to Storage Database (SQLServer). In Tridion 5.3 they were. 2) HTML Fragments are getting stored in database.

In our implementation binary files, page, embedded component templates are stored on file system and Dynamic component templates are stored in SQL Sever database.

We think we have missed something in our cd_storage_config. Please find attached config file.

<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="6.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schemas/cd_storage_conf.xsd">
<Global>
    <ObjectCache Enabled="false">
        <Policy Type="LRU" Class="com.tridion.cache.LRUPolicy">
            <Param Name="MemSize" Value="16mb"/>
        </Policy>
        <Features>
            <Feature Type="DependencyTracker" Class="com.tridion.cache.DependencyTracker"/>
        </Features>
    </ObjectCache>
    <Storages>
        <Storage Type="persistence" Id="sqlserver" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
            <Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
            <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
                <Property Name="serverName" Value="local" />
                <Property Name="portNumber" Value="1433" />
                <Property Name="databaseName" Value="TridionBroker" />
                <Property Name="user" Value="TridionBrokerUser" />
                <Property Name="password" Value="mypass" />
            </DataSource>
        </Storage>
        <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultFile" defaultFilesystem="false">
            <Root Path="d:\Inetpub\MyPortal" />
        </Storage>
        <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultDataFile" defaultFilesystem="true" defaultStorage="true">
            <Root Path="d:\Inetpub\MyPortal\data" />
        </Storage>
        <SearchFilter Name="SearchFilter" Class="com.tridion.broker.components.meta.MsSqlSearchFilterHome" defaultStorageId="sqlserver"/>
    </Storages>
</Global>
<ItemTypes defaultStorageId="defaultDataFile" cached="false">
    <Item typeMapping="Query" storageId="sqlserver"/>
    <Item typeMapping="Page" cached="false" storageId="defaultFile"/>
    <Item typeMapping="Binary" cached="false" storageId="defaultFile"/>
    <Item typeMapping="ComponentPresentation" itemExtension=".Jsp" storageId="sqlserver"/>
    <Item typeMapping="ComponentPresentation" itemExtension=".Asp" storageId="sqlserver"/>
    <Item typeMapping="ComponentPresentation" itemExtension=".Xml" storageId="sqlserver"/>
    <Item typeMapping="ComponentPresentation" itemExtension=".Txt" storageId="sqlserver"/>
    <Item typeMapping="Metadata" cached="true" storageId="sqlserver"/>
    <Item typeMapping="XSLT" cached="true" storageId="sqlserver"/>
</ItemTypes>
<License Location="d:\Tridion\config\cd_licenses.xml"/>

like image 243
user1453602 Avatar asked Oct 20 '12 12:10

user1453602


1 Answers

You don't have any ascx binding in your storage config. In 5.3, it used to be Asp binding.

Change the following:

<Item typeMapping="ComponentPresentation" itemExtension=".Asp" storageId="sqlserver"/>

To:

<Item typeMapping="ComponentPresentation" itemExtension=".ascx" storageId="sqlserver"/>

Also, in tridion 2011 you don't need to specify mapping for each type (like txt, jsp etc..) if you want all to be stored in db.

You can simply do this:

<Item typeMapping="ComponentPresentation" storageId="sqlserver"/>
like image 195
Ram G Avatar answered Nov 11 '22 01:11

Ram G