Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sap.m.DynamicDateRange: sap/base/i18n/ResourceBundle: value for parameter 'aArgs' is not of type array #4156

Open
stabpd opened this issue Oct 24, 2024 · 1 comment

Comments

@stabpd
Copy link

stabpd commented Oct 24, 2024

OpenUI5 version:

Minimal example:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>sap.m.DynamicDateRange getText error</title>

        <script
            src="https://sapui5untested.int.sap.eu2.hana.ondemand.com/resources/sap-ui-core.js"
            data-sap-ui-theme="sap_horizon"
            data-sap-ui-libs="sap.m"
            data-sap-ui-compatVersion="edge"
        ></script>
    </head>

    <body>
        <script>
            sap.ui.require(["sap/m/DynamicDateRange"], (DynamicDateRange) => {
                new DynamicDateRange({
                    value: { operator: "TODAY", values: [] },
                }).placeAt(document.body);
            });
        </script>
    </body>
</html>

Steps to reproduce the problem:

  1. Open html file with above code in browser.
  2. Check JS console output.
  3. Optionally check against https://ui5.sap.com/1.129.0/resources/sap-ui-core.js if the current untested UI5 version does not bring that error up anymore.

What is the expected result?
No errors in JS console.

What happens instead?
Errors in JS console:

- 2024-10-24 09:59:99.999999 sap/base/i18n/ResourceBundle: value for parameter 'aArgs' is not of type array -
- 2024-10-24 09:59:99.999999 sap/base/i18n/ResourceBundle: value for parameter 'aArgs' is not of type array -
- 2024-10-24 09:59:99.999999 sap/base/i18n/ResourceBundle: value for parameter 'aArgs' is not of type array -

Any other information? (attach screenshot if possible)
DynamicDateFormat passes null as args to ResourceBundle.prototype.getText where only undefined and arrays seem to be allowed.
(check source code)

Proposed solution:
Pass undefined instead in that case.

@DonkeyCo
Copy link
Member

I've created an internal incident (DINC0310695) for you.
The issue will be updated accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants