Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We already have #allowed_units on the form elements, but there's no setting on the widget, or an alter hook. We need at least one of those.
Comment | File | Size | Author |
---|---|---|---|
#13 | 3012104-10.patch | 3.73 KB | balagan |
|
Issue fork physical-3012104
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
pcambraHow about this?
Comment #3
bojanz CreditAttribution: bojanz at Centarro commentedIt's a good start.
We're missing updated schema (in physical.schema.yml, the field.widget.settings.* entries)
Also:
Why the mismatch, allowed_units VS available_units? I'd expect the widget setting to also be available_units.
Why are we changing this? Looks like we're still returning just the class name.
Comment #4
Dinesh18 CreditAttribution: Dinesh18 as a volunteer commentedFixed the below points :
1) We're missing updated schema (in physical.schema.yml, the field.widget.settings.* entries)
2) Why the mismatch, allowed_units VS available_units? I'd expect the widget setting to also be available_units.
as per comment #3
Comment #5
pcambra@bojanz, regarding the change on
getUnitClass
, on my tests I've found that it was a unitinterface what I was receiving, please correct me if I'm wrong:Comment #6
pcambraComment #7
jeffschulerThis is working well and very necessary.
Much appreciated!
Comment #10
OleksiyI got the error during the configs import:
The config schema attached to the patch is not correct. The Config inspector module tells the same.
Added updated scheme to the new MR.
Comment #11
voleger#9 looks good for me
the only thing which would be nice to address is to sanitize the options of units which is not selected as allowed. That is not something that blocks the feature, widget setting properly handles such values. I suggest addressing that in the follow-up if it really requires attention.
Comment #12
voleger#10 something is unrelated to this patch as the #9 declares sequence and the message posted here showing undefined mapping. Looks like something messed up in the project configuration. And dont forget rebuild the container after applying the patch.
Comment #13
balagan CreditAttribution: balagan at Gizra commentedCreated a patch from the interdiff at #10
Comment #14
jsacksick CreditAttribution: jsacksick at Centarro commentedCommitted! Thanks everyone!