有两个 sharepoint 2016 服务器 - 本地(用于测试目的)和生产。所有更新都安装在两台服务器上。
在本地服务器上,移动视图工作正常,但在生产中出现以下 JS 错误:
touchapp.js?rev=3rU9Jr5OtqOHAouuUOO75g%3D%3DTAG0:1 Uncaught TypeError: Cannot read property 'SuiteVersion' of undefined
at Object.RetrieveMobileSuiteNavData (touchapp.js?rev=3rU9Jr5OtqOHAouuUOO75g%3D%3DTAG0:1)
at init (touchapp.js?rev=3rU9Jr5OtqOHAouuUOO75g%3D%3DTAG0:1)
at new SharePointSuiteNav (touchapp.js?rev=3rU9Jr5OtqOHAouuUOO75g%3D%3DTAG0:1)
at initSuiteNav (touchapp.js?rev=3rU9Jr5OtqOHAouuUOO75g%3D%3DTAG0:1)
at SharePointAppBar.Initialize (touchapp.js?rev=3rU9Jr5OtqOHAouuUOO75g%3D%3DTAG0:1)
at HostAppBar.Initialize (touchapp.js?rev=3rU9Jr5OtqOHAouuUOO75g%3D%3DTAG0:1)
at init (touchapp.js?rev=3rU9Jr5OtqOHAouuUOO75g%3D%3DTAG0:1)
at new SPTouchApp.AppBarController (touchapp.js?rev=3rU9Jr5OtqOHAouuUOO75g%3D%3DTAG0:1)
at Object.buildAppBarController [as builder] (touchapp.js?rev=3rU9Jr5OtqOHAouuUOO75g%3D%3DTAG0:1)
at initializeUiControllers (touchapp.js?rev=3rU9Jr5OtqOHAouuUOO75g%3D%3DTAG0:1)
经过调查,我发现“/_layouts/15/touchapp.aspx”生成的 HTML 在本地和生产服务器上是不同的。在本地服务器上,它包含以下字符串:
<script type="text/javascript">(function(){window.CommonSuiteNavData = {Scripts: ["/_layouts/15/mylinks.js?rev=HjKTiRHbpPJBEU6OeYZGyw%3D%3DTAG0"],...
在生产服务器上,HTML 不包含此字符串。我认为这是提到的 JS 错误的原因。我们还发现,在本地 Sharepoint 上,浏览器正在加载“mylinks.js”,而在生产环境中,浏览器不会加载此脚本。
请帮助我理解为什么两台服务器会生成不同的 HTML 和/或如何确定上述 JS 错误的原因。