SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.51k stars 262 forks source link

[OpenUI5Support]: Version 1.120 Fatal Issue due to Formatting function being renamed #7871

Closed i832513 closed 10 months ago

i832513 commented 10 months ago

Bug Description

Please refer to the following links:

  1. https://jira.tools.sap/browse/[CPOUI5MODELS-1487](https://jira.tools.sap/browse/CPOUI5MODELS-1487)
  2. https://github.com/SAP/openui5/commit/cccc04332e026bf2e74789d1f70619e8f58d370a

The function Formatting.setLegacyDateCalendarCustomizing is renamed in version 1.120 - it is unclear at this time if OpenUI5 will deliver a new version of OpenUI5 which provides the backwards compatibility necessary to prevent fatal page errors.

Affected Component

OpenUI5Support

Expected Behaviour

The OpenUI5Support static import should not crash the page no matter what version of OpenUI5 is being used.

Isolated Example

https://codesandbox.io/s/ui5-webcomponents-forked-5kchxn?file=/index.html

Steps to Reproduce

  1. Include OpenUI5 1.120.0
  2. Include OpenUI5Support feature statically

This will break the page and not load any web components.

Log Output, Stack Trace or Screenshots

OpenUI5Support.ts:140 Uncaught TypeError: i.getLegacyDateCalendarCustomizing is not a function at Function.value (OpenUI5Support.ts:140:48) at InitialConfiguration.ts:187:39 at w (InitialConfiguration.ts:203:2) at l (InitialConfiguration.ts:46:2) at l (Theme.ts:16:14) at d (Theme.ts:71:23) at 292 (nav-back.js:5:18) at __webpack_require__ (bootstrap:19:22) at fetchLocalizedContent.js:173:1 at index.tsx:29:3

Priority

High

UI5 Web Components Version

1.19

Browser

Chrome, Edge, Firefox, Safari

Operating System

Any

Additional Context

Compatibility with version 1.120.0

Organization

SuccessFactors

Declaration

i832513 commented 10 months ago

I'm having trouble right now to get the sandbox to reproduce the issue because openui5 script is not downloading or executing - I'm not sure what i did wrong - but someone could fix that.

https://codesandbox.io/s/ui5-webcomponents-forked-5kchxn?file=/index.html

pskelin commented 10 months ago

It seems that your sample works with 1.120.0, but if you change the bootstrap to nightly like here, it does break. https://codesandbox.io/s/ui5-webcomponents-forked-hj8k3z?file=/index.html:1102-1167

Working on a fix right now.

ilhan007 commented 10 months ago

Hi @scameron we plan to downport this fix for 1.19 as 1.19.1

Do you need this for older versions?

scameron commented 10 months ago

I don't think we're waiting for this fix on our side. Did you mean to tag @i832513 instead?

ilhan007 commented 10 months ago

Hello Scott @i832513 we plan to downport this fix for 1.19 as 1.19.1

Do you need this for older versions?

i832513 commented 10 months ago

@ilhan007 , I know that the project having this issue is currently on 1.15.x - but I don't know how difficult it would be to upgrade that project to version 1.19.1 as part of the patch, if there are no major issues with that we can consider to upgrade to 1.19.1 to fix the issue.

ilhan007 commented 10 months ago

Ok, @i832513 let me know if you would be able to upgrade or rather stay on 1.15

i832513 commented 9 months ago

@ilhan007 , Can you please downport this to 1.17.X because we are using that version in production right now.