Active
Project:
Drupal core
Version:
main
Component:
field system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Aug 2014 at 10:45 UTC
Updated:
6 Feb 2025 at 23:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
yched commentedIIRC, #access FALSE means the the #default_value gets passed directly into form submitted values, right ?
I guess on some widgets that might skip some transformations steps and you end up with varying value structures in massageFormValues() depending on whether the widget was fully processed or not.
Requires more investigation, but maybe there are cases where we want to skip massageFormValues() (random thought, maybe that's not the right fix).
Comment #2
yched commentedI tried to reproduce by having EntityFormDisplay::buildForm() force #access = FALSE on Node 'created' field,
but I did not run into a case where TimestampDatetimeWidget::massageFormValues() received an $item where $item['value'] was not the expected DrupalDateTime object.
Attaching a test patch to try to run the full test suite on this.
Comment #3
yched commentedAs a side note, we should really do something about the fact that buildEntity() runs three time on a node form submit :-/
I think I opened an issue long ago, will try to find and bump it.
[edit: that's #1768526: NodeFormController::validate() calls buildEntity() twice ]
Comment #4
yched commentedI can haz test ?
Comment #6
yched commentedGreen - so either there is in fact no problem, or we don't have a test that reproduces it.
@Berdir, any recollection of the case where you had issues in #2226493: Apply formatters and widgets to Node base fields ? :-)
Comment #8
mgiffordPatch no longer applies.
Comment #20
quietone commentedThe testing done by @yched suggests that this is no longer a problem but it is not clear what the steps to reproduce this are. Let's see if anyone knows.
@Berdir, do you recall how to reproduce this problem?
Comment #22
quietone commentedNo steps to reproduce have been provided since they were first asked for 8 years ago. I reckon it is time to close this one.
Comment #23
andypostIt needs work to remove TODO at least
Comment #24
andypost