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

Variables tab crash after setting Objects API registration. #5031

Open
LaurensBurger opened this issue Jan 23, 2025 · 3 comments · Fixed by #5021 · May be fixed by #5150 or #5152
Open

Variables tab crash after setting Objects API registration. #5031

LaurensBurger opened this issue Jan 23, 2025 · 3 comments · Fixed by #5021 · May be fixed by #5150 or #5152
Assignees
Labels
needs-backport Fix must be backported to stable release branch owner: den-haag
Milestone

Comments

@LaurensBurger
Copy link
Collaborator

LaurensBurger commented Jan 23, 2025

Product versie / Product version

3.0.1

Customer reference

DH

Omschrijf het probleem / Describe the bug

After setting registration > Objects API (variable mapping). The variables tab in the from crashes:

react-dom.production.min.js:189 TypeError: Cannot read properties of undefined (reading 'find')
    at summaryHandler (ObjectsApiSummaryHandler.js:30:59)

Previously mapped, or imported forms with "variables_mapping" do not show this behavior.

@LaurensBurger LaurensBurger added bug triage Issue needs to be validated. Remove this label if the issue considered valid. labels Jan 23, 2025
@sergei-maertens sergei-maertens linked a pull request Jan 23, 2025 that will close this issue
10 tasks
@sergei-maertens
Copy link
Member

Bob seems to experience this still on 3.0.2

@sergei-maertens sergei-maertens self-assigned this Feb 5, 2025
@joeribekker joeribekker removed the triage Issue needs to be validated. Remove this label if the issue considered valid. label Feb 10, 2025
@joeribekker
Copy link
Contributor

Refinement: Blocked until DH gives us details when this happens.
Estimate: 1 day

@joeribekker joeribekker added blocked needs-backport Fix must be backported to stable release branch labels Feb 10, 2025
@joeribekker
Copy link
Contributor

Workaround is throw registration backend away :D

@joeribekker joeribekker added this to the Release 3.1.0 milestone Mar 10, 2025
@robinmolen robinmolen moved this from Todo to In Progress in Development Mar 10, 2025
robinmolen added a commit that referenced this issue Mar 11, 2025
…bjects API registrations

Due to a previously missing default value, some (older) Objects API registrations might not have `variables_mapping` in their `options` configuration. This causes issues when trying to configure variables to the Objects API, resulting in javascript errors.

This script ensures that all Objects API registrations have, at least, an empty array as `options` `variables_mapping`.
robinmolen added a commit that referenced this issue Mar 11, 2025
…bjects API registrations

Due to a previously missing default value, some (older) Objects API registrations might not have `variables_mapping` in their `options` configuration. This causes issues when trying to configure variables to the Objects API, resulting in javascript errors.

This script ensures that all Objects API registrations have, at least, an empty array as `options` `variables_mapping`.
@robinmolen robinmolen linked a pull request Mar 11, 2025 that will close this issue
10 tasks
robinmolen added a commit that referenced this issue Mar 11, 2025
Any form with an Objects API registration V2 (the variable mapping), that doesn't have `variables_mapping` in the `options` config, will have its `variables_mapping` set to empty array.

Due to a previously missing default value in the Objects API registration, the `options` value `variables_mapping` could be missing. If missing, this would cause javascript errors in during the variable mapping in the admin.
robinmolen added a commit that referenced this issue Mar 11, 2025
…_mapping options

When importing a form with an Objects API registration, that doesn't have a version, the version is set to 2.
And based on the version of the Objects API registration, a default value for `variables_mapping` is set.
@robinmolen robinmolen moved this from In Progress to Implemented in Development Mar 11, 2025
robinmolen added a commit that referenced this issue Mar 12, 2025
…bjects API registrations

Due to a previously missing default value, some (older) Objects API registrations might not have `variables_mapping` in their `options` configuration. This causes issues when trying to configure variables to the Objects API, resulting in javascript errors.

This script ensures that all Objects API V2 registrations have, at least, an empty array as `options` `variables_mapping`.
robinmolen added a commit that referenced this issue Mar 12, 2025
Any form with an Objects API registration V2 (the variable mapping), that doesn't have `variables_mapping` in the `options` config, will have its `variables_mapping` set to empty array.

Due to a previously missing default value in the Objects API registration, the `options` value `variables_mapping` could be missing. If missing, this would cause javascript errors in during the variable mapping in the admin.
robinmolen added a commit that referenced this issue Mar 12, 2025
…_mapping options

When importing a form with an Objects API registration, that doesn't have a version, the version is set to 2.
And based on the version of the Objects API registration, a default value for `variables_mapping` is set.
robinmolen added a commit that referenced this issue Mar 12, 2025
The V1 Objects API registration should not have the `variablesMapping` property. This will result in error when validation in the backend.
robinmolen added a commit that referenced this issue Mar 12, 2025
…bjects API registrations

Due to a previously missing default value, some (older) Objects API registrations might not have `variables_mapping` in their `options` configuration. This causes issues when trying to configure variables to the Objects API, resulting in javascript errors.

This script ensures that all Objects API V2 registrations have, at least, an empty array as `options` `variables_mapping`.
robinmolen added a commit that referenced this issue Mar 12, 2025
Any form with an Objects API registration V2 (the variable mapping), that doesn't have `variables_mapping` in the `options` config, will have its `variables_mapping` set to empty array.

Due to a previously missing default value in the Objects API registration, the `options` value `variables_mapping` could be missing. If missing, this would cause javascript errors in during the variable mapping in the admin.
robinmolen added a commit that referenced this issue Mar 12, 2025
…_mapping options

When importing a form with an Objects API registration, that doesn't have a version, the version is set to 2.
And based on the version of the Objects API registration, a default value for `variables_mapping` is set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment