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.
Problem/Motivation
UUID fields don't specify a default_formatter
Proposed resolution
Add "basic_string" as "default_formatter"
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#27 | interdiff-2450153-27.txt | 4.92 KB | damiankloip |
#27 | 2450153-27.patch | 6.82 KB | damiankloip |
#24 | 2450153-24.patch | 2.48 KB | damiankloip |
#20 | add_a_default_formatter-2450153_tests-20.patch | 552 bytes | anksy |
#11 | interdiff-2450153-2-11.txt | 591 bytes | josephleon |
Comments
Comment #1
dawehner.
Comment #2
joshi.rohit100Comment #4
tstoecklerThere's a missing trailing comma after
no_ui = TRUE
.Comment #5
josephleon CreditAttribution: josephleon commentedI am starting work on this.
Comment #6
plachActually a trailing comma for the last item will break annotation parsing. The easiest thing would be to move this line before
no_ui
.Comment #7
amateescu CreditAttribution: amateescu commented@plach, that's not true anymore, @chx fixed it in Doctrine :)
Comment #8
dawehnerThis is not longer the case, see https://github.com/doctrine/annotations/pull/11
Comment #9
josephleon CreditAttribution: josephleon commentedComment #10
dinarcon CreditAttribution: dinarcon commentedThanks @josephleon
Could you please remove the trailing comma?
Comment #11
josephleon CreditAttribution: josephleon commentedComment #12
josephleon CreditAttribution: josephleon commentedComment #13
dawehnerMh, I'm not sure whether we should really drip the last comma.
Comment #14
aspilicious CreditAttribution: aspilicious commenteddawehner before it didn't have a trailing comma
Comment #15
plachComma or not we need some additional test coverage :)
Comment #16
josephleon CreditAttribution: josephleon commentedI'm new to testing, still reading documentation. Will try and tackle it though.
Comment #17
plachThanks!
Comment #18
anksy CreditAttribution: anksy commentedI am a novice working on writing a test for this issue and I cant find any test files where tests for this issue will fit therefore I have created a file for tests related to Uuid formatting. It has the following address "core/modules/field/src/Tests/UuidFormatterTest.php". In the absence of a more appropriate name for the test file I went with "UuidFormatterTest.php" until I can find a more appropriate name.
Comment #19
josephleon CreditAttribution: josephleon commented@anksy I was running into the same issue. I would be more than happy to work with you on that. Could you post what you have so far?
Comment #20
anksy CreditAttribution: anksy commented@josephleon, Here is the progress that I have made so far. Will need some guidance on writing further tests.
Comment #22
joshi.rohit100Comment #23
joshi.rohit100I am not sure whether this should have a test case or not as I am seeing that Email field is also using the basic_string formatter and there is not formatter testcase for this as we have StringFormatterTest class and I think, this will do the thing (If I am not wrong).
Comment #24
damiankloip CreditAttribution: damiankloip commentedHow about some simple test coverage like this?
Comment #25
dawehnerMh, default output
Note: #2353611: Make it possible to link to an entity by UUID is some sort of issue which would be great to get in but just sorta related.
Comment #26
dawehnerOne thing we could do as well here is to uncomment all the uuid lines of subclasses of
\Drupal\views\Tests\Handler\FieldFieldAccessTestBase
Comment #27
damiankloip CreditAttribution: damiankloip commentedHere, we go. If we are enabling those lines in the tests we need to special case for the uuid field in FieldFieldAccessTestBase.
Comment #28
dawehnerThank you a lot!
Comment #29
alexpottA missing formatter for something we want to output in views is a bug. Committed f2fdaeb and pushed to 8.0.x. Thanks!
Fixed all the unused uses on commit.