【问题标题】:Continuously Update Preview alert on SDL Tridion UI 2012在 SDL Tridion UI 2012 上持续更新预览警报
【发布时间】:2012-06-03 01:09:59
【问题描述】:

我正在尝试在某些测试(默认)页面上建立新的 SDL Tridion UI 2012 功能。尽管我多次单击“更新预览”,但我不断检索“此页面的预览不是最新的”警报。我使用的是虚拟图像,所以除了我自己之外,任何人都无法编辑页面。不管哪个组件发生了变化。我查看了“会话预览”Web 服务端的 cd_core.log 文件,发现这些节点很有趣:

INFO  WritableODataClaimProcessor - No session wrapper is installed, not allowing modification operations
DEBUG HandleSessionContentUtil - There are no session wrappers into storage config file!
DEBUG HandleSessionContentUtil - There are no session wrappers into storage config file!
DEBUG WebContext - setCurrentClaimStore: com.tridion.siteedit.preview.PreviewClaimStore@dc60af, thread: Thread-59
DEBUG WritableODataClaimProcessor - Removing sessionId claim from ClaimStore!
DEBUG ClaimStore - remove: uri=taf:claim:contentdelivery:webservice:preview:sessionid
DEBUG WebContext - setCurrentClaimStore: null, thread: Thread-59

最有趣的部分是会话包装器被添加到“会话预览”Web 服务端的 cd_storage_conf.xml 中。 Bellow 是“会话预览”cd_storage_conf.xml 的一部分:

    <Storages>       
        <Wrappers>               
            <Wrapper Name="SessionWrapper">             
                <Timeout>120000</Timeout>                  
                <Storage Type="persistence" Id="sqlServerDb" 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="T2011" />
                        <Property Name="portNumber" Value="1433" />
                        <Property Name="databaseName" Value="Tridion_Session_Preview"/>
                        <Property Name="user" Value="TridionSessionPreview"/>
                        <Property Name="password" Value="tridion"/>
                    </DataSource>
                </Storage>                   
            </Wrapper>
        </Wrappers>            
        <StorageBindings>
            <Bundle src="preview_dao_bundle.xml"/>            
        </StorageBindings>       
        <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="staging" defaultFilesystem="false">
            <Root Path="C:\inetpub\wwwroot\software" />
        </Storage>
       <Storage Type="persistence" Id="sqlServerDb" 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="T2011" />
                <Property Name="portNumber" Value="1433" />
                <Property Name="databaseName" Value="Tridion_Broker_Staging"/>
                <Property Name="user" Value="TridionBrokerUser"/>
                <Property Name="password" Value="tridion"/>
            </DataSource>
        </Storage>
    </Storages>    
</Global>

<ItemTypes defaultStorageId="sqlServerDb" cached="false">
    <Item typeMapping="Page" cached="false" storageId="staging"/>
</ItemTypes>

我检查了 cd_storage_conf.xml 的有效性状态,一切正常(尝试通过 IE 打开 XML 并正确显示)。

当我重新发布页面(完成编辑)时,重新加载页面后一切都处于正确状态,直到对任何组件进行第一次更改。这种意想不到的状态给了我如此强烈的痛苦和头痛,更让我感到如此紧张...... :)。

【问题讨论】:

  • @Frank 你想和我分享一下如何“着色”代码以提高可读性...
  • 我在它之前添加了一个 标签。如果您单击我编辑的时间戳(即“14 分钟前”文本),您将看到确切的差异。此外,我重新缩进了您的 XML,这也有助于提高可读性。

标签: tridion tridion-2011


【解决方案1】:

以下是更新预览的作用,确保实际页面刷新之前的所有步骤都能正常工作并且配置正确,您应该好好做:

  1. 在预览模式下呈现您的模板
  2. 将结果发布到 Content Delivery Web 服务
  3. CD Web 服务写入 Session Wrapper 数据库
  4. 刷新页面
  5. 环境框架过滤器(或 .NET 的 HTTP 模块)检查会话令牌
  6. 查询数据库以搜索具有相同会话令牌的内容
  7. 如果找到内容,则将其与页面上的内容合并。

典型问题(以我目前的经验)围绕环境框架配置 - 模块未在您的应用程序上安装/配置,或者 cd_ambient_conf.xml 包含无效的配置设置。

可能值得从第 1 步开始跟踪日志以找出失败的地方 - 知道失败的地方通常是解决方案的 80%。

【讨论】:

  • web.configs (web 服务和登台站点包含对 [System.webserver\modules] 和 [system.web\httpModules] 内的 [Tridion.ContentDelivery.AmbientData.HttpModule] 的引用。会话预览 web服务在 bin 文件夹中包含 [Tridion.ContentDelivery.AmbientData.dll],在 lib 文件夹中包含 [cd_preview_ambient.jar] 和 [cd_preview_webservice.jar]。是否存在与启用环境数据框架相关的任何其他设置/配置?cd_ambient_conf.xml 仅包含 [ ] 在 [Cartridges] 节点内...
  • 我发现以下有趣的会话预览 Web 服务日志 [SessionManagerImpl - 无声明存储!!!环境框架可能未启用!]。在 cd_ambient_conf.xml 内的临时站点上存在 [com.tridion.siteedit.preview.PreviewClaimStoreProvider]。此外,在编辑某些组件字段时,只有单击该字段才能看到更改。我已经检查并按预期安装了 Web 服务,它返回值...
  • Web 服务使用不同的声明存储(默认存储),您不应更改它。您是否尝试过使用安装程序附带的预构建 Web 应用程序?我会尝试比较 DLL 和 Jars 的版本(使用 Beyond Compare 之类的东西)。您可以在 [UI 安装文件夹]\Content Delivery\roles\Web|WebService\dotNet 下找到预构建的应用程序
  • 问题已解决。 [Tridion.ContentDelivery.Preview.dll] 被放置在会话预览 Web 服务和登台站点上。从会话预览 Web 服务中删除以及重新启动 IIS 会导致完整的 UI 功能。 @Nuno谢谢你给我指路......无论如何,从我的角度来看,这是一个很好的功能
猜你喜欢
  • 1970-01-01
  • 2012-07-06
  • 1970-01-01
  • 2012-06-02
  • 1970-01-01
  • 2012-07-01
  • 2012-10-31
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多