Skip to content

BUG: NodeCreationDialog should not submit empty string for optional fields #3755

Open
@mhsdesign

Description

@mhsdesign

I was curious about the $propertyValue === '' && !TypeHandling::isSimpleType($propertyType) part in Neos 8.3 because it seems to have gone missing in 9.0 after the ESCR adjustments.

Originally it was introduced to fix bwaidelich/Wwwision.Neos.CreationDialogProperties#10

But when using the nodePropertyConversionService we get the $rawValue !== '' check for free in:

if ((is_string($rawValue) || is_array($rawValue)) && $this->objectManager->isRegistered($innerType) && $rawValue !== '') {

So Neos 8.3 would even forgive us not filtering out this case and writing an empty string to the node because we handle it currently at the read site:

https://github.com/neos/neos-development-collection/blob/eada1dbfb569de6e3932b26b4b3c630401020e05/Neos.ContentRepository/Classes/Domain/Model/Node.php#L924-L931

Neos 9 on the other hand is much stricter and we must check if the original issue bwaidelich/Wwwision.Neos.CreationDialogProperties#10 will resurface.

Originally posted by @mhsdesign in #3720 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions