Exception handling for type: relation
It would appear many plugins incorrectly use type: relation as a list column, when this does nothing. Previously it would fallback to the text type, now that invalid types fail hard, this adds a softer landing by spamming the trace log instead. Refs #2438
This commit is contained in:
parent
91e7e8b950
commit
ee2dd78b3d
|
|
@ -920,6 +920,16 @@ class Lists extends WidgetBase
|
|||
return $this->evalTextTypeValue($record, $column, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Common mistake, relation is not a valid list column.
|
||||
* @deprecated Remove if year >= 2018
|
||||
*/
|
||||
protected function evalRelationTypeValue($record, $column, $value)
|
||||
{
|
||||
traceLog(sprintf('Warning: List column type "relation" for class "%s" is not valid.', get_class($record)));
|
||||
return $this->evalTextTypeValue($record, $column, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process as partial reference
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue