无法加载Sitecore版本图像 [英] Sitecore versioned image not loading

查看:104
本文介绍了无法加载Sitecore版本图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Sitecore 6.5,并具有一个数据模板,该模板具有一个图像字段和一个基于该模板的项目.该网站有两种语言.

I'm running Sitecore 6.5 and have a data template that has an image field and an item that's based on that template. The site had two languages.

如果在项目的En和Fr版本中使用版本化的映像(媒体库中具有En和Fr版本的一项),则发布站点并使用查询字符串sc_lang = en或在站点中切换语言fr,页面中除图片以外的所有内容都会发生变化.

If I use a versioned image (one item in the media library with En and Fr versions) in the En and Fr versions of the item then publish the site and switch the language in the site using query string, sc_lang=en or fr, everything changes in the page except for the image.

但是,如果我使用两个不同的图像(媒体库中的两个项目),则在切换语言时会加载正确的图像.

But if I use two different images (two items in the media library) then the correct image loads when switching between languages.

为什么会这样?

谢谢 T

更新

我尝试使用共享选项,但没有用.我还注意到,如果仅添加查询参数并按Enter键,页面将更改为正确的语言,但是图像只有在单击刷新按钮后才会显示.这似乎是一个缓存问题,但是为什么它仅在版本图像中发生.

I tried using the shared option and that didn't work. I also noticed that if I just add the query parameter and hit enter, the page changes to correct language but the image doesn't until I hit the refresh button. It seems a caching issue but why does it happen only with versioned images.

推荐答案

Sitecore支持人员确认这是一个错误,这是他们的临时解决方法:

Sitecore support confirmed that it is a bug and here's their temporary workaround:

  1. Sitecore.Support.320556.dll复制到website\bin文件夹,该dll尚未在SDN上,

  1. Copy Sitecore.Support.320556.dll to the website\bin folder, the dll isn't on SDN yet, http://tareknasser.com/projects/sitecore/Sitecore.Support.320556.dll

在web.config文件中找到并注释掉以下节点:

In the web.config file find and comment out the following node:

<processor type="Sitecore.Pipelines.RenderField.GetImageFieldValue, Sitecore.Kernel"/>

,并在已注释的内容之后添加以下内容之一:

and add the following one below right after the commented one:

<processor type="Sitecore.Support.Pipelines.RenderField.GetImageFieldValue, Sitecore.Support.320556"/>

这对我在发布网站和页面编辑器中都有效.

That worked for me in both the publish site and the page editor.

这篇关于无法加载Sitecore版本图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆