Problem/Motivation
The integration between any kind of fields and views live in field module. This is fine at the moment, because
it just deals with configurable fields (which is what the field module is about).
#2342045: Standard views base fields need to use same rendering as Field UI fields, for formatting, access checking, and translation consistency Once you switch over to also render base fields like that (for the purpose of translatability) you get test failures,
because now views like the content view depends on the field module. This also results in new dependency of the user module (which is itself required).
https://qa.drupal.org/pifr/test/935258 shows some of the errors
Proposed resolution
Move the field integration into the views module.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#22 | interdiff.txt | 3.74 KB | dawehner |
#22 | 2399931-22.patch | 51.09 KB | dawehner |
#19 | interdiff.txt | 539 bytes | dawehner |
#19 | 2399931-19.patch | 48.26 KB | dawehner |
#17 | 2399931-17.patch | 48.26 KB | dawehner |
Comments
Comment #1
yched CreditAttribution: yched commented+1, most def
Comment #2
dawehner*fingers crossed
Comment #5
plachThis is blocking a critical...
Comment #6
yched CreditAttribution: yched commentednitpick, but:
views_field_views_field... ;-)
Any way we could unrecurse the name a bit ?
[edit: also applies to views_field_views_field_label()]
Comment #7
yched CreditAttribution: yched commentedAlso minor, but I think the current API around Entity type handlers could now let us check "does the storage class extend SqlContentEntityStorage ?" without actually instantiating the storage object ?
Comment #8
yched CreditAttribution: yched commentedWow - this used to work back in the days where the "list" field types were provided by a list.module, but I don't think this is ever called in current HEAD ?
Should be options_field_views_data(), and live in options.module ?
Comment #9
dawehnerNo, sure, things don't work at all at the moment, this is why we have a different critical for that: #2012130: Regression: Views integration for "list" field types is broken
Can we deal with anything beside moving in a different issue?
Note: This patch did not passed because of stupidy.
Comment #11
dawehnerMeh
Comment #12
dawehnerIt was supposed to be a quickfix (just move around the code and be done).
Comment #13
dawehner.
Comment #14
yched CreditAttribution: yched commented@dawehner : fair enough, will open a separate issue for #7.
Last remaining nitpick : can we also simplify the name of views_field_views_field_label() ?
(see #6)
Comment #15
dawehnerwell, I kept that one, because
views_field_label()
sounds way too generic ... better suggestions, maybeviews_entity_field_label()
?Comment #16
yched CreditAttribution: yched commentedviews_[...]_field_[...]_label() : yeah, mulling on that.
Meanwhile:
That's the wrong FieldConfigInterface, this will also catch BaseFieldOverrides, which we don't want here.
It should be Drupal\field\FieldConfigInterface, that's what the current field_views_field_label() uses.
See #2399301: There should be only one FieldConfigInterface :-/
Comment #17
dawehnerReroll and rename
Comment #18
yched CreditAttribution: yched commentedviews_entity_field_label() - why not I guess.
RTBC when #16 is fixed :-)
Comment #19
dawehnerOh right, my brain decided today, that it a good idea to ignore you for a while :P
This is quite confusing ...
Comment #20
yched CreditAttribution: yched commented;-)
Comment #21
alexpottall appear in views.api.php and need changing since these functions no longer exist. There are multiple instances...
Isn't this function name problematic because there is hook_field_views_data? This is a separate, already existing, issue just noticed whilst reviewing.
I think this needs to move the views module.
Comment #22
dawehnerGo(o)d catches!
Well, this implements the existing hook, and yes, this function is broken beyond repair.
Comment #23
slashrsm CreditAttribution: slashrsm commentedStuff from #21 addressed. Looks good to me.
Comment #25
webchickCommitted and pushed to 8.0.x. Thanks!
Comment #28
penyaskitoPublished change record.
Comment #29
jhedstromWhile working on #2395763: Fields are not 'click sortable' in views, I realized that as part of the fix here, the relevant test from the field module (
Drupal\field\Tests\Views\ApiDataTest
) should probably have also been moved to the views module. Should that be a separate follow-up issue?Comment #30
dawehner@jhedstrom
Yeah a follow up would be great!
Comment #31
jhedstromI added #2404265: Follow-up: ApiTestData should be in the views module.