简体   繁体   English

Safari 7.1中的ASPMenu无法在SharePoint 2010中正确呈现

[英]ASPMenu in Safari 7.1 Not Rendering Properly in SharePoint 2010

Has anyone else encountered an issue with the newest release of Safari 7.1 on Mac and iOS8 that breaks an ASPMenu control within SharePoint 2010? 有没有其他人遇到过Mac和iOS8上最新版本的Safari 7.1在SharePoint 2010中打破ASPMenu控件的问题? The ASPMenu worked fine before hand, but now after the update it has decided to render the contents incorrectly. ASPMenu工作正常,但现在更新后它决定不正确地呈现内容。 I've tried setting the Page.ClientTarget = "uplevel", as well as modify the compat.browser file to include the adapter "System.Web.UI.WebControls.Menu" for Safari, but neither option is helping fix the issue. 我已经尝试设置Page.ClientTarget =“uplevel”,并修改compat.browser文件以包含Safari的适配器“System.Web.UI.WebControls.Menu”,但这两个选项都没有帮助解决问题。

Can anyone help? 有人可以帮忙吗? The menu worked completely fine before the Safari update. 在Safari更新之前,菜单完全正常。 Thanks! 谢谢!

Ended up figuring out what the issue was. 结束了解问题是什么。 In the past, the browser ID that the server would see for Safari was "Safar1Plus". 过去,服务器为Safari看到的浏览器ID是“Safar1Plus”。 This correlates with the entry in the compat.browser file as listed: 这与compat.browser文件中的条目相关联,如下所示:

<browser id="Safari2" parentID="Safari1Plus">
    <controlAdapters>
        <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
    </controlAdapters>
</browser>

Safari 7.1 no longer ties to the this browser ID, and has now been updated to "Safari60". Safari 7.1不再与此浏览器ID绑定,现在已更新为“Safari60”。 I found this out by doing a simple command in javascript on my custom SharePoint page: 我通过在自定义SharePoint页面上的javascript中执行一个简单的命令找到了这个:

alert("<%=Request.Browser.Id %>");

This told me the new browser ID that the server sees. 这告诉我服务器看到的新浏览器ID。 It reported back now as "Safari60". 它现在报告为“Safari60”。 I then went back into the compat.browser file under my web application and added a new browser and referenced the new browser ID: 然后我回到我的web应用程序下的compat.browser文件中并添加了一个新的浏览器并引用了新的浏览器ID:

<browser refID="Safari60">
    <controlAdapters>
        <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
    </controlAdapters>
</browser>

Once I saved the compat.browser file with this new addition, Safari 7.1 was now happy and rendering the ASPMenu like it has in the past. 一旦我用这个新增的内容保存了compat.browser文件,Safari 7.1现在很高兴并且像过去那样渲染ASPMenu。 Hopefully that helps! 希望这有帮助!

The default location of the SP browser definition file is at “C:\\Inetpub\\wwwroot\\wss\\VirtualDirectories\\\\App_Browsers\\compat.browser” SP浏览器定义文件的默认位置位于“C:\\ Inetpub \\ wwwroot \\ wss \\ VirtualDirectories \\\\ App_Browsers \\ compat.browser”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM