- Issue created by @pdureau
- π«π·France pdureau Paris
Mikael, can you have a look before Christian do it? (You may also take it if Christian is busy)
- π«π·France pdureau Paris
Can we also remove this from ComponentElementBuilder::buildProp() ?
if (empty($data) && $prop_type->getPluginId() !== 'attributes') { // For JSON Schema validator, empty value is not the same as missing // value, and we want to prevent some of the prop types rules to be // applied on empty values: string pattern, string format, enum, number // min/max... // However, we don't remove empty attributes to avoid an error with // Drupal\Core\Template\TwigExtension::createAttribute() when themers // forget to use the default({}) filter. return $build; }
It looks like a security we may not need anymore
- π©πͺGermany Christian.wiedemann
christian.wiedemann β made their first commit to this issueβs fork.
- π©πͺGermany Christian.wiedemann
I removed everything I was sure it doesn' break anything. For that reason I did not remove:
if (empty($data) && $prop_type->getPluginId() !== 'attributes') { // For JSON Schema validator, empty value is not the same as missing // value, and we want to prevent some of the prop types rules to be // applied on empty values: string pattern, string format, enum, number // min/max... // However, we don't remove empty attributes to avoid an error with // Drupal\Core\Template\TwigExtension::createAttribute() when themers // forget to use the default({}) filter. return $build; }
Where is the logic moved? I think we need it.
And we need also ui_patterns_field_config_delete. We could optimize the code and call the event inside the hook but it is a very little optimization so I decided to let it as it is.
- π«π·France pdureau Paris
Let's create an other ticket for this specific
empty($data) && $prop_type->getPluginId() !== 'attributes')
issue.If everything else is done (or skipped because considered unsafe) you can give the current ticket to Mikael for review
- First commit to issue fork.
- π«π·France just_like_good_vibes PARIS
looks ok for merge. then i just rebased to prepare merge
-
just_like_good_vibes β
committed 92d062e9 on 2.0.x authored by
christian.wiedemann β
Issue #3493134 by christian.wiedemann, pdureau: Remove TODOs and...
-
just_like_good_vibes β
committed 92d062e9 on 2.0.x authored by
christian.wiedemann β
Automatically closed - issue fixed for 2 weeks with no activity.