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
Function list_allowed_values
removed long ago but this plugin still using it
public function getValueOptions() {
$field_storage_definitions = \Drupal::entityManager()->getFieldStorageDefinitions($this->definition['entity_type']);
$field_storage = $field_storage_definitions[$this->definition['field_name']];
$this->valueOptions = list_allowed_values($field_storage);
}
Proposed resolution
fix implementation and add tests
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#14 | 2578433-remove-field-list-plugins.patch | 7.08 KB | longwave |
#2 | 2578433-2.patch | 724 bytes | hussainweb |
Comments
Comment #2
hussainwebJust the fix for now.
Comment #3
hussainwebIs there a test which I can refer/copy for this?
Comment #4
andypostI found no tests about this plugin
Comment #5
dawehnerWell kinda obviously, given that otherwise the tests would have failed, wouldn't have they?
Comment #6
andypost@dawehner I have no idea how this plugin *could be* used...
Comment #7
cilefen CreditAttribution: cilefen commented#5 ha
Comment #8
yched CreditAttribution: yched commentedOh gee. Doesn't this mean that this class is just useless dead code ? (
Comment #9
damiankloip CreditAttribution: damiankloip commentedThis seems at least related to #2012130: Regression: Views integration for "list" field types is broken
Comment #10
damiankloip CreditAttribution: damiankloip commentedThis seems at least related to #2012130: Regression: Views integration for "list" field types is broken
Comment #11
yched CreditAttribution: yched commentedSo this is on the 'field_list' filter, but nothing ever seems to reference that filter, what is it ever used for ?
Plus, on HEAD :
- If I add a "List (text)" field to article nodes with options a, b, c
- and edit admin/structure/views/view/frontpage,
- I can add a filter on the feld, which presents me the right options (a, b, c),
- and the filter works as expected.
So it seems the functionnality is present, and is not provided by this obviously broken plugin here ?
Comment #12
yched CreditAttribution: yched commentedIt seems we have :
\Drupal\options\Plugin\views\filter\ListField (looks correct, and is exposed by options_field_views_data())
and
\Drupal\views\Plugin\views\filter\FieldList (is the broken one discussed here, not exposed anywhere by anyone)
So, isn't this just "rm \Drupal\views\Plugin\views\filter\FieldList" ?
Comment #13
longwaveI think \Drupal\views\Plugin\views\argument\FieldList can be removed as well, as that has also been replaced by \Drupal\options\Plugin\views\argument\NumberListField, and \Drupal\views\Plugin\views\argument\ListString has been replaced by \Drupal\options\Plugin\views\argument\StringListField.
The only thing I can find that refers to these is field.views.schema.yml (in the wrong module anyway?) and so it seems this can all be safely removed.
Comment #14
longwaveComment #15
LendudeAs @damienkloip said in #9, this is related to #2012130: Regression: Views integration for "list" field types is broken. In the patches before comment #68, these 3 files were deleted, but after a reroll in #68 the deletions were no longer in the patches (but should have been).
So it's indeed just leftover orphaned code.
Comment #17
alexpottCommitted d7d1dfa and pushed to 8.0.x. Thanks!
I did not ask for an upgrade patch because these plugins were just broken.