From 029a299816f7a726c9eeb4adb70fd18d1db4f533 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Tue, 9 Jul 2019 08:25:08 -0600 Subject: [PATCH] Remove support for invalid relation type column Fixes #4443. --- modules/backend/widgets/Lists.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index c9901cd92..d63e4967e 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -1150,8 +1150,13 @@ class Lists extends WidgetBase return call_user_func_array($callback, [$value, $column, $record]); } } + + $customMessage = ''; + if ($type === 'relation') { + $message = 'Type: relation is not supported, instead use the relation property to specify a relationship to pull the value from and set the type to the type of the value expected.'; + } - throw new ApplicationException(sprintf('List column type "%s" could not be found.', $type)); + throw new ApplicationException(sprintf('List column type "%s" could not be found. %s', $type, $customMessage)); } /** @@ -1178,16 +1183,6 @@ 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 */