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

FEATURE: check if properties of node are valid #47

Closed
wants to merge 1 commit into from

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.

1 participant