I am using the sap.ui.comp.smarttable.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.
The change in the commit 5e3848d
, available since UI5 core 1.74.0, shows that the file TableExtension.js
was renamed to ExtensionBase.js
and moved to the new extensions
directory. So sap/ui/table/extensions/ExtensionBase.js
should've been fetched. But that refactoring is not the actual cause of the issue. According to Andreas Kunz, UI5 had a cache invalidation issue in CDN. Your browser might have also reported misleadingly that the requested resource has been "blocked by CORS policy" but this is simply because the 404-response itself has no 'Access-Control-Allow-Origin' header. The issue is not related to CORS.
The fact that such cache issues or UI5 internal changes affect your application indicates that your application is bootstrapping UI5 with a default version of the CDN URL. E.g. in index.html
:
src=
"https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"(default version)
The "default version" is intended only for tutorial or testing purposes.
In the browser console (F12), you might see the error log "sap
is not defined". SAP removes outdated UI5 versions from the CDN according to the notes 3001696 and 3314374:
SAP removes SAPUI5 versions from the SAPUI5 CDN one year after their end of maintenance. In addition to this also patches of versions in maintenance which are older than one year will be removed.
To reduce the chance of being affected by such removals, or to benefit from continuous framework fixes and other improvements in one of the long-term maintenance releases automatically, bootstrap UI5 with the "evergreen version" as shown below.
Apps, that run on a productive system and using UI5 resources externally from the standard CDN at the same time, must specify a UI5 version in the URL as documented in the topic Variant for Bootstrapping from Content Delivery Network.
Based on ui5.sap.com/versionoverview.html (SAPUI5*) or sdk.openui5.org/versionoverview.html (OpenUI5), and <x.y.z>
referring to the major.minor.patch version respectively:
Recommended: with a patch-level independent aka. "evergreen version" (<x.y>
) in conjunction with one of the long-term maintenace versions (1.71, 1.84, 1.96, 1.108, 1.120, ...):
<head>
<!-- ... -->
<script id="sap-ui-bootstrap"
src="https://ui5.sap.com/<x.y>/resources/sap-ui-core.js"
data-sap-ui-async="true"
data-sap-ui-onInit="module:sap/ui/core/ComponentSupport"
data-sap-ui-resourceRoots='{ "my.app": "./" }'
data-sap-ui-...="..."
></script>
<!-- No inline script here! Avoid sap.ui.getCore().attachInit -->
</head>
<body id="content" class="sapUiBody">
<div data-sap-ui-component
data-id="myRootComponentContainer"
data-name="my.app"
data-height="100%"
data-settings='{ "id": "myRootComponent" }'
data-...="..."
></div>
</body>
With a "specific version" (<x.y.z>
):
<script id="sap-ui-bootstrap"
src="https://ui5.sap.com/<x.y.z>/resources/sap-ui-core.js"
data-sap-ui-...="..."
></script>
This is especially important for apps that still use deprecated APIs if they keep relying on the "default version" since deprecated APIs will be removed in the next UI5 major version (aka. "Legacy-free UI5") automatically.
Note: the hostname *.hana.ondemand.com
is outdated. Replace it with ui5.sap.com
(SAPUI5) or sdk.openui5.org
as per the announcement "Short and Powerful: Convenient URLs for SAPUI5/OpenUI5 CDN" | SAP Blogs.
* When using the SAPUI5 CDN, please review the SAP Note 2943781 - Is the usage of SAP's Content Delivery Network for onPremise systems permitted?
See if the issue gets resolved after:
If the issue is still reproducible, create an incident from SAP Support with CA-UI5-DLV as the component.