Skip to content

Conversation

@mhsdesign
Copy link
Contributor

@mhsdesign mhsdesign commented May 31, 2023

A few checks are run against the properties of the node

  1. It is checked, that a node only has properties set, that were declared in the NodeType

  2. In case the property is a select-box, it is checked, that the current value is a valid option of the select-box

  3. It is made sure is that a property value is never null for the reason: In case that due to a condition in the nodeTemplate null is assigned to a node property, it will override the defaultValue. This is a problem, as setting null might not be possible via the Neos UI and the Fusion rendering is most likely not going to handle this edge case. So we assume this must have been a mistake. A cleaner, but also more difficult way would be to actually assert that the type matches

image

A few checks are run against the properties of the node

1. It is checked, that a node only has properties set, that were declared in the NodeType

2. In case the property is a select-box, it is checked, that the current value is a valid option of the select-box

3. It is made sure is that a property value is never null for the reason:
  In case that due to a condition in the nodeTemplate `null` is assigned to a node property, it will override the defaultValue.
  This is a problem, as setting `null` might not be possible via the Neos UI and the Fusion rendering is most likely not going to handle this edge case.
  So we assume this must have been a mistake. A cleaner, but also more difficult way would be to actually assert that the type matches
@mhsdesign mhsdesign requested a review from Sebobo May 31, 2023 13:30
* @var FeedbackCollection
* @Flow\Inject
*/
protected $feedbackCollection;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is hacky as hell i know ^^

@mhsdesign mhsdesign marked this pull request as draft June 1, 2023 09:56
@mhsdesign
Copy link
Contributor Author

Included in #53

@mhsdesign mhsdesign closed this Jun 4, 2023
@mhsdesign mhsdesign deleted the feature/checkIfPropertiesOfNodeAreValid branch June 14, 2023 15:40
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

Successfully merging this pull request may close these issues.

2 participants