Skip to content

API Channel: mapped numeric IDs get lost when using fieldsets #495

Closed
@simon-matt-oetztal

Description

@simon-matt-oetztal

When the API Channel is using numeric IDs for the mapped fields, the IDs get lost when fieldsets are used.

In our case the mapped nodes array should look like this:
[ 46 => "1", 1 => "Simon", 2 => "Matt", 3 => "[email protected]", 14 => 10, 4548 => "2" ]

but looks like:
[ 0 => "1", 1 => "Simon", 2 => "Matt", 3 => "[email protected]", 4 => 10, 5 => "2" ]

This is caused by "array_merge":
https://github.com/dachcom-digital/pimcore-formbuilder/blob/master/src/OutputWorkflow/Channel/Api/ApiOutputChannelWorker.php#L131

solution: using "array_replace"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions