SmartTable control has internal load resource error since 1.74

蹲街弑〆低调 提交于 2021-01-28 11:21:04

问题


I am using the 'SmartTable' control in some SAP cloud foundry UI5 apps.

Since a week or so the table control cannot render anymore using the current release (1.74.1) as the following XHR load fails:

https://sapui5.hana.ondemand.com/resources/sap/ui/table/TableExtension.js

If I force the usage of an older release - eg '1.73.1' - then it works fine and the above resource is found.

Is there something changed with the 'Smart Table' concept I am not aware of or is this an issue with the library itself?

I checked the change logs for UI5 but didn't see anything mentioned there.


回答1:


I don't see the error message that fetching sap/ui/table/TableExtension.js fails. Try opening this Demo Kit sample in an incognito window or in Guest mode(?), select the fiscal year appropriately (e.g. 1970...2020), and press Go.

In commit:5e3848d (available since 1.74), the file TableExtension.js was refactored. But that should not be causing the 404 issue. According to Andreas Kunz, UI5 had a cache invalidation issue in CDN.

The fact that such cache issues affect your application indicates that your app is bootstrapping without a concrete version in the CDN URL. To fix this, bootstrap the UI5 resources (e.g. in index.html):

  • With a specific version:

    <script id="sap-ui-bootstrap" src="https://ui5.sap.com/1.74.1/resources/sap-ui-core.js">
    
  • Or by leveraging Cache Buster:

    <script id="sap-ui-bootstrap" src="resources/sap-ui-cachebuster/sap-ui-core.js">
    

After improving the bootstrap step, the table should work again without the error.


Manually, you can empty cache by long-pressing the reload button and selecting Empty Cache and Hard Reload as shown in this guide (video).



来源:https://stackoverflow.com/questions/60339067/smarttable-control-has-internal-load-resource-error-since-1-74

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!