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

[BUG] - Formbuilder Fieldset Fields with API Channel produced "Undefined array key - type" error #423

Closed
erikjewel opened this issue Oct 30, 2023 · 1 comment
Labels

Comments

@erikjewel
Copy link

erikjewel commented Oct 30, 2023

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no

Hi Dachcom-Digital Team,
we have occurred a bug on Formbuilder version 4.5.
Our Form contain two fields which are encapsulated into fieldset container, like in figure 1 below. As Output Worklfow, we using an API Channel which send data to an extern System. When we trying to send the form in Frontend, we catch an error about array key, also see figure 2. After debugging we have found, that the childs of an fieldset are not used in a loop as flat array, but as a branch of arrays, which produced such kind of problems. For that i have take a Screenshot of Code (figure 3) where the error occurres. In the line 123 i have included temporarily a fix for testing measures. Will be grateful, when this fix comes as update from your side.

Screenshots:

Bildschirm­foto 2023-10-30 um 11 23 39

Fig. 1 - Supposed error code block

Bildschirm­foto 2023-10-30 um 11 21 43

Fig. 2 - Form structure

Bildschirm­foto 2023-10-30 um 10 53 59

Fig. 3 - Frontend form error message

Thanks and best regards!

@solverat
Copy link
Member

solverat commented Jan 5, 2024

Using the null coalescing operator is enough since we're checking for a valid type reference later on:

$type = $context['type'] ?? $context['parentType'];

Fixed in 4.5.1 and 5.0.3

@solverat solverat closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants