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
While working on https://www.drupal.org/node/2451657, I dropped this patch up for testing: https://www.drupal.org/files/issues/drupal_2451657_185.patch.
I made a mistake, and passed an incorrect key, which doesn't cause a failure anywhere.
i.e. my incorrect views config looked like so:
nid:
id: nid
field: nid
table: node_field_data
plugin_id: field
entity_type: nid
Just for context, valid configuration for this portion of the view looks like this:
nid:
id: nid
field: nid
table: node_field_data
plugin_id: field
entity_type: node
entity_field: nid
Since `nid` is not a valid entity_type, this should be causing a test failure somewhere!
Proposed resolution
Remaining tasks
Investigate how this is tested currently.
Ensure that invalid views configuration causes test failures
User interface changes
None
Comments
Comment #2
willwh CreditAttribution: willwh at North Studio commentedComment #3
willwh CreditAttribution: willwh at North Studio commentedLooks like we probably want this to land first: https://www.drupal.org/node/1928868
Comment #4
dawehnerComment #11
quietone CreditAttribution: quietone as a volunteer commentedThe issue this was postponed on was fixed in 2019, therefor changing status. Also update version.
I did not investigate validation of views configuration.
Comment #15
LendudeWe are checking valid keys, we are checking value types. So config not being validating is a bit strong. We could validate more, yes, but the only way to get into a situation like this is if you manually edit a config file (right?), so I'm not too worried about edge cases like this.
Closing this as "won't fix" for now, feel free to reopen this if you feel there is a case to be made for being more strict here.