5

I am publishing pages, and storing them in the broker database. I then retrieve them via the Content Delivery API using:

PageMetaFactory pageMetaFactory = new PageMetaFactory(publicationMeta.Id);
IPageMeta pageMeta = pageMetaFactory.GetMetaByUrl(publicationMeta.Id, pageUrl);

The PageMeta object is retrieved successfully, however the ComponentPresentationMeta count is always zero. In Tridion I have added two Component Presentations and published the file numerous times. I also see two Component Presentations when previewing the page.

My storage configuration is specified as below:

<ItemTypes defaultStorageId="defaultdb" cached="false">
    <Item typeMapping="Binary" storageId="defaultFile" cached="false"/>
    <Item typeMapping="PageMeta" storageId="defaultdb" cached="false"/>
    <Item typeMapping="ComponentPresentationMeta" storageId="defaultdb" cached="false"/>
</ItemTypes>

I've checked the database, and I see the page in the PAGE_CONTENT table, but no Component Presentations in either COMPONENT_PRES_META_DATA or COMPONENT_PRESENTATIONS tables

Update - 12/22/2014

Tried an updated Storage Configuration as per below, to ensure everything is going to the database, but still the LINK_INFO table remains empty. Other items, such as Component Presentations are being entered into the database.

<ItemTypes defaultStorageId="defaultdb" cached="true"></ItemTypes>

Also checked the deployer configuration, shared below

    <?xml version="1.0" encoding="UTF-8"?>

<!-- The Tridion Content Distributor Deployer configuration specifies all
    configuration values required to receive and deploy content to a delivery system. -->
<Deployer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="7.1" xsi:noNamespaceSchemaLocation="schemas/cd_deployer_conf.xsd">  
  <!-- The Processors section defines what actions the Deployer is able to
          performed. The behavior of the Deployer is defined by the type of
          Processors the type and sequence of modules. The Processors section is
          where custom Deployer behavior can be configured. -->  
  <Processors> 
    <!-- A Processor is triggered by the Deployer to process an incoming
               TransportPackage based on the 'Action' command in the
               ProcessorInstructions. The default Processor triggers modules
               sequentially as they are defined in a Processor section. The 'Class'
               attribute defines the Processor class that will be used for processing an action.
               'Phase' attribute is optional and it defines in which processing phase this processor is active. 'Phase'
               attribute can have following values: pre-processing, processing, post-processing, pre-transaction and post-transaction.
               The default value is processing.-->  
    <!-- <Processor Action="Deploy" Class="com.tridion.deployer.Processor" Phase="post-transaction"> -->  
    <Processor Action="Deploy" Class="com.tridion.deployer.Processor"> 
      <!-- A Module is triggered by a Processor to process incoming instructions.
                    The 'Type' attribute needs to be unique within a Processor and serves
                    as a symbolic identifier. The 'Class' attribute defines the
                    implementation used for any type of Module. Replace or add modules to
                    implement custom Deployer behavior. -->  
      <Module Type="SchemaDeploy" Class="com.tridion.deployer.modules.SchemaDeploy"/>  
      <Module Type="PageDeploy" Class="com.tridion.deployer.modules.PageDeploy"> 
        <!-- The transformer enables the TCDL Engine -->  
        <Transformer Class="com.tridion.deployer.TCDLTransformer"/> 
      </Module>  
      <Module Type="BinaryDeploy" Class="com.tridion.deployer.modules.BinaryDeploy"/>  
      <Module Type="ComponentDeploy" Class="com.tridion.deployer.modules.ComponentDeploy"/>  
      <Module Type="TemplateDeploy" Class="com.tridion.deployer.modules.TemplateDeploy"/>  
      <Module Type="PublicationDeploy" Class="com.tridion.deployer.modules.PublicationDeploy"/>  
      <!-- This module enables deployment of taxonomies -->  
      <Module Type="TaxonomyDeploy" Class="com.tridion.deployer.modules.TaxonomyDeploy"/>  
      <Module Type="ComponentPresentationDeploy" Class="com.tridion.deployer.modules.ComponentPresentationDeploy"> 
        <!-- The transformer enables the TCDL Engine -->  
        <Transformer Class="com.tridion.deployer.TCDLTransformer"/> 
      </Module>  
      <!-- This module enables deployment of structure groups -->  
      <Module Type="StructureGroupDeploy" Class="com.tridion.deployer.modules.StructureGroupDeploy"/>  
      <!-- This module enables the deploy of extension data. This module should be enabled if you are using UNDO -->  
      <!-- <Module Type="ExtensionDataDeploy" Class="com.tridion.deployer.modules.ExtensionDataDeploy"/> --> 
    </Processor>  
    <Processor Action="Undeploy" Class="com.tridion.deployer.Processor"> 
      <Module Type="PageUndeploy" Class="com.tridion.deployer.modules.PageUndeploy"/>  
      <Module Type="ComponentPresentationUndeploy" Class="com.tridion.deployer.modules.ComponentPresentationUndeploy"/>  
      <!-- This module enables the undeploy of taxonomies -->  
      <Module Type="TaxonomyUndeploy" Class="com.tridion.deployer.modules.TaxonomyUndeploy"/>  
      <!-- This module enables the undeploy of structure groups -->  
      <Module Type="StructureGroupUndeploy" Class="com.tridion.deployer.modules.StructureGroupUndeploy"/>  
      <!-- This module enables the undeploy of extension data. This module should be enabled if you are using UNDO -->  
      <!-- <Module Type="ExtensionDataUndeploy" Class="com.tridion.deployer.modules.ExtensionDataUndeploy"/> --> 
    </Processor>  
    <!-- Undo Deployer modules.-->  
    <!--
        <Processor Action="Undo" Class="com.tridion.deployer.Processor">
          <Module Type="UndoModule" Class="com.tridion.deployer.UndoDeploy"/>
        </Processor>
        -->  
    <!-- Undo Deployer module for post-transaction should be enabled only if there are any deployer post-transaction modules configured.-->  
    <!--
        <Processor Action="Undo" Class="com.tridion.deployer.Processor" Phase="post-transaction">
          <Module Type="UndoModule" Class="com.tridion.deployer.UndoPostTransactionDeploy"/>
        </Processor>
        -->  
    <!-- Undo Deployer module for pre-transaction should be enabled only if there are any deployer pre-transaction modules configured.-->  
    <!--
        <Processor Action="Undo" Class="com.tridion.deployer.Processor" Phase="pre-transaction">
          <Module Type="UndoModule" Class="com.tridion.deployer.UndoPreTransactionDeploy"/>
        </Processor>
        -->  
    <Processor Action="Deploy" Class="com.tridion.deployer.Processor" Phase="post-transaction">
      <Module Type="SmartTargetDeploy" Class="com.tridion.smarttarget.deployer.FredhopperDeployerModule">
        <Transformer Class="com.tridion.deployer.TCDLTransformer"/>
      </Module>
    </Processor>
    <Processor Action="Undeploy" Class="com.tridion.deployer.Processor" Phase="post-transaction">
      <Module Type="SmartTargetUndeploy" Class="com.tridion.smarttarget.deployer.FredhopperUndeployModule"/>
    </Processor>
  </Processors>  
  <!-- Configure the Queue locations the deployer checks for incoming deployment packages -->  
  <Queue> 
    <Location Path="d:\tridion\incoming\staging" WindowSize="20" Workers="10" Cleanup="true" Interval="2s"/>  
    <!--<Location Path="c:\tridion\work\http" WindowSize="10" Workers="10" Cleanup="true" Interval="30s"/> --> 
  </Queue>  
  <!-- Configure the HTTPSReceiver to store incoming package in specified location, and configure if deployer should run in process -->  
  <HTTPSReceiver MaxSize="10000000" Location="d:\tridion\incoming\staging" InProcessDeploy="true"/>  
  <!--
     Specifies the location of the license file.
     -->  
  <License Location="d:/Tridion/config/cd_licenses.xml"/>  
  <TCDLEngine> 
    <Properties> 
      <!-- Default code generation will always be targetted towards the use of tag libraries and
                  server controls. Uncomment these lines to drop that behaviour -->  
      <Property Name="tcdl.dotnet.style" Value="controls"/>  
      <Property Name="tcdl.jsp.style" Value="tags"/>  
      <!-- Since R5.4 another interop mechanism for ASP.NET has been introduced this setting
               will allow code generation into that new Interop model. -->  
      <!-- <Property Name="tcdl.dotnet.style" Value="native_interop" /> -->  
      <!-- To use the deprecated R5.3 code generation enable this line -->  
      <!-- <Property Name="tcdl.dotnet.style" Value="com_interop" /> -->  
      <!--To fix the target language to a specific language uncomment any of the following lines -->  
      <!--<Property Name="tcdl.target.language" Value="jsp" />-->  
      <!--<Property Name="tcdl.target.language" Value="dotnet" />-->  
      <!--<Property Name="tcdl.target.language" Value="rel" />-->  
      <!--Deprecated: <Property Name="tcdl.target.language" Value="vbscript" />-->  
      <!--Deprecated: <Property Name="tcdl.target.language" Value="jscript" />--> 
    </Properties>  
    <!--
        Optional configuration needed in case of using the UGC TCDL transformers
        -->  
    <!--
        <TagBundle Resource="ugc_tag_bundle.xml"/>
        -->  
    <TagBundle Resource="com/sdl/context/transformer/contextTagTransformerBundle.xml"/>  
    <TagBundle Resource="com/tridion/smarttarget/tcdl/tagbundle.xml"/>
  </TCDLEngine>  
  <!--
     Specify RMI listening port
     -->  
  <!--
     <RMIChannel ListenerPort="1050"/>
     --> 
</Deployer>

Update - 12/24/2014

Added a cd_link_conf file to the deployer web application, but still no ComponentPresentationMeta's

Update - 12/30/2014

Thanks Bjørn, but the priority is set to medium

The cd_linking.jar was infact missing from the HTTPUpload web application. After adding it, there was still no entries in the afore mentioned database tables.

2
  • 1
    Are you storage settings consistent on both, the website and the Deployer? – Nickoli Roussakov Dec 12 '14 at 0:56
  • Could you please verify your storage config or could you pelase provide your storage config file so that I give a glimpse on it. – Nash Dec 24 '14 at 12:40
5

Are your component presentations statically embedded dynamic component presentations or just statically embedded? I don't believe statically embedded non-dynamic CPs are stored as component presentations at all in the broker...

Update: seeing as how your are interested in the statically assembled CPs on the page these would be stored in the LINK_INFO table. I've confirmed that the code you are using should work regardless of whether these are static or statically assembled DCPs...

I would verify if 1. you have the data in the LINK_INFO table of the broker database 2. if not check the deployer and storage configuration of the deployer 3. if so check the storage and linking configuration of the web application

4
  • I tend to agree, only DCPs are stored in the broker COMPONENT_PRESENTATIONS table. – Bart Koopman Dec 12 '14 at 10:29
  • 1
    Or COMPONENTS for that matter... – Bjørn van Dommelen Dec 12 '14 at 10:34
  • Thanks for the answers and comments. I have the CPs in the COMPONENT_PRESENTATIONS now (making them DCPs), but what I don't have is the Metadata that the page has any CPs on the PageMeta object. Nickoli very kindly tested this in his environment for me, and it worked, so my configuration must be off somewhere. – Chris Morgan Dec 12 '14 at 20:44
  • I've looked in the LINK_INFO table and do not see anything here. So far I have not noticed anything wrong with my deployer and storage configuration – Chris Morgan Dec 23 '14 at 1:53
3

For the ComponentPresentation to Page link to be persisted to the Content Delivery side, you must call RenderComponentPresentation() on each ComponentPresentation during template rendering.

If you do not, then the ComponentPresentationMeta list will be empty when you retrieve the PageMeta object via the Content Delivery API.

1
  • "Other items, such as Component Presentations are being entered into the database." is rather misleading in that case as it suggests the page is rendering the CPs; you did not mention publishing the DCPs separately... – Bjørn van Dommelen Jan 12 '15 at 13:43
2

I was curious to understand the case here. was trying to simulate your situation.

I am not sure but can you confirm the the reference in REFERENCE_ENTRIES table?

SELECT * FROM [Tridion_Broker].[dbo].[REFERENCE_ENTRIES] 
where [PUBLICATION_ID]=--pubid--and REFERENCED_URI like '%--compid-%'

Do you get the result here?

6
  • Hi Chris, just to double confirm, you have not missed out "<Publication Id="--" /> in 'cd_link_conf' under deployer application. – user Dec 24 '14 at 6:48
  • My HTTPUpload application does not have a cd_link_conf file. My web application does. Should the HTTPUpload have it? – Chris Morgan Dec 24 '14 at 20:13
  • I think you need to have under HTTPUpload as well. – user Dec 25 '14 at 6:13
  • I added it, but unfortunately no change – Chris Morgan Dec 25 '14 at 6:36
1

Maybe a long shot but is the link priority of the component template set to "never link"? If so I can imagine the entries in the LINK_INFO table not showing up even with a valid config...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.