我已经安装了Tridion UI并在日志文件中收到以下警告.除了此警告,即使在调试模式下,日志文件中也没有记录任何错误.
"WARN AmbientDataContext - 没有当前的环境数据上下文 - 环境数据框架未正确初始化"
此警告会记录在我的会话预览Web服务cd_core.2012-11-11.log文件中,也会记录在暂存Web应用程序的同一日志文件中.我怀疑由于这个警告我没有在UI界面中获得页面的更新预览.有关UI错误,请参阅下面附带的屏幕截图 -
我还尝试通过点击"更新页面预览"按钮更新预览,但没有运气.为了解决这个错误,我在堆栈溢出中遵循了几乎所有与此相关的答案.如果我在下面的问题中提到答案.
Tridion UI - 预览不更新
所以我们在这一点上是正确的,因为内容总是在正确的地方发布.我想从Session Preview服务的cd_dynamic_conf.xml中的设置中探索类似的点,如下所示 -
<URLMappings>
<StaticMappings>
<Publications>
<Publication Id="241">
<Host Domain="xyz" Port="80" Protocol="http" Path="/" />
</Publication>
<Publication Id="121">
<Host Domain="xyz" Port="80" Protocol="http" Path="/" />
</Publication>
</Publications>
</StaticMappings>
<StorageMapping IdentifyPublicationByProperty="publicationUrl"/>
</URLMappings>
Run Code Online (Sandbox Code Playgroud)
并且在登台应用程序中
<URLMappings>
<StaticMappings>
<Publications>
<Publication Id="241">
<Host Domain="xyz" Port="80" Protocol="http" Path="/" />
</Publication>
</Publications>
</StaticMappings>
<StorageMapping IdentifyPublicationByProperty="publicationUrl"/>
</URLMappings>
Run Code Online (Sandbox Code Playgroud)
和SiteEdit标记创建这样的东西 -
用于组件演示
<!-- Start SiteEdit Component Presentation: {"ID":"cp_5", "ComponentID":"tcm:240-22393", "ComponentVersion":19, "ComponentTemplateID":"tcm:240-23899-32", "IsQueryBased":false} -->
Run Code Online (Sandbox Code Playgroud)
用于页面设置
<!-- SiteEdit Settings: …Run Code Online (Sandbox Code Playgroud) 我有新的UI设置,并注意到,当我更新页面时,它没有更新更新.我也没有看到page_ {sessionId/GUID} .aspx创建.
检查会话预览数据库,我看到PAGE_CONTENT表中的更改与新呈现的内容,所以似乎会话预览工作正常但预览网站无法获取更改并刷新UI.
我检查了.aspx的所有预览处理程序和映射,并确保它们在web.config中是正确的.有关为什么预览网站没有显示更改的任何想法?
我在cd_storage_conf.xml中设置了会话预览数据库.
<StorageBindings>
<Bundle src="preview_dao_bundle.xml"/>
</StorageBindings>
<Wrappers>
<Wrapper Name="SessionWrapper">
<Timeout>120000</Timeout>
<Storage Type="persistence" Id="db-session-webservice" 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="localhost" />
<Property Name="portNumber" Value="1433" />
<Property Name="databaseName" Value="Tridion_Broker_SessionPreview" />
<Property Name="user" Value="usr" />
<Property Name="password" Value="pwd" />
</DataSource>
</Storage>
</Wrapper>
</Wrappers>
Run Code Online (Sandbox Code Playgroud)
web.config(处理程序):
<add verb="GET" path="*.htm" type="Tridion.ContentDelivery.Preview.Web.StaticFileHandler" />
<add verb="GET" path="*.jpg" type="Tridion.ContentDelivery.Preview.Web.StaticFileHandler" />
<add verb="GET" path="*.png" type="Tridion.ContentDelivery.Preview.Web.StaticFileHandler" />
<add verb="GET" path="*.html" type="Tridion.ContentDelivery.Preview.Web.StaticFileHandler" />
<add name="Tridion.ContentDelivery.Preview.Web.PreviewContentModule" type="Tridion.ContentDelivery.Preview.Web.PreviewContentModule" />
Run Code Online (Sandbox Code Playgroud)
记录(删除了时间戳和DEBUG前缀):
ClaimStore - …Run Code Online (Sandbox Code Playgroud)