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

NodeCreationDialog should not submit empty string for optional fields #3755

Open
mhsdesign opened this issue Mar 16, 2024 · 0 comments
Open

Comments

@mhsdesign
Copy link
Member

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)

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

No branches or pull requests

1 participant