- πΊπΈUnited States neclimdul Houston, TX
Looking at the patch, it looks like it filters out all validations from hidden fields. That doesn't seem like a good thing, we should still want validation of hidden fields. If I'm miss-reading it could we can add a comment to the code explaining why its ok to filter them?
- πΊπ¦Ukraine HitchShock Ukraine
@neclimdul cuz this is normal Drupal behavior to not validate hidden fields on entity form. You can check this by you self:
- add required field to the node
- hide it on the entity form
- on node save action you should not see the error that field is empty
- when the field is visible you will see an errorThis is an expected behavior.
Paragraph breaks this logic when it's collapsed. But works well when it's expanded.
So we need to fix this behaviour for the collapsed paragraph case. - Status changed to RTBC
about 1 year ago 9:49am 15 September 2023 - π¨πSwitzerland berdir Switzerland
Committed, agreed that this makes sense.
- Status changed to Fixed
10 months ago 10:50am 14 January 2024 -
Berdir β
committed 4006a90f on 8.x-1.x authored by
HitchShock β
Issue #3321404 by HitchShock: Validation error on collapsed paragraph...
-
Berdir β
committed 4006a90f on 8.x-1.x authored by
HitchShock β
Automatically closed - issue fixed for 2 weeks with no activity.
- πΊπΈUnited States kescoto-thinkshout
Has anyone else continued to see this issue? We are still encountering this error even though we have the latest version of the module.
I agree, the error is still occurring even with the patch applied, any updates on this case ?
- π¦π«Afghanistan drupalam
This issue should be fixed if you update to version 1.17.
$violations = $paragraphs_entity->validate(); $violations->filterByFieldAccess(); $hidden_fields = (array) $display->get('hidden'); $violations->filterByFields(array_keys($hidden_fields));