I already reported this issue but for Drupal 7 and just found it this is also happening in d8:
From my other issue:
When using a select list, if you have two values like:
3.10
03.10The problem that happens is that the comparison made to select the stored value when editing the form is not an strict comparison so 3.10 ends up being 03.10.
To reproduce:
Create a select list on any content type and add the following values:
3.10|3.10
03.10|03.10Create a node and select 3.10 then edit that node and check for the selected value.
Same is happening on D8, as both cores uses the same function. Attaching a patch on the first comment.
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal-select-list-strict-comparison-2489592-1.patch | 732 bytes | di3gopa |
Comments
Comment #1
di3gopa CreditAttribution: di3gopa at Rootstack commentedComment #2
di3gopa CreditAttribution: di3gopa at Rootstack commentedComment #3
di3gopa CreditAttribution: di3gopa at Rootstack commentedComment #14
quietone CreditAttribution: quietone at PreviousNext commentedThis feels like a duplicate. Searching ...
Yes, this is the same as #2762953: Select elements should use strict comparison which I closed as outdated a few weeks ago. I'll make this a duplicate of that one.
Cheers,