From acdaad4939c85042caac8d395e4ff2d727c0ba42 Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Sat, 9 May 2026 17:53:13 +0300 Subject: [PATCH] Fix listItem element: derive plugin/controller from request instead of entity to avoid null entity errors --- app/templates/element/form/listItem.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/templates/element/form/listItem.php b/app/templates/element/form/listItem.php index 50d7aa60d..050e90cc0 100644 --- a/app/templates/element/form/listItem.php +++ b/app/templates/element/form/listItem.php @@ -40,9 +40,8 @@ $fieldName = $arguments['fieldName']; $this->set('vv_field_arguments', $arguments); -$qualifiedModelName = StringUtilities::entityToPluginClassName($this->Field->getEntity()); -$plugin = StringUtilities::pluginPlugin($qualifiedModelName); -$controller = StringUtilities::pluginModel($qualifiedModelName); +$plugin = $this->getRequest()->getParam('plugin'); +$controller = (string)$this->getRequest()->getParam('controller'); // If an attribute is frozen, inject a special link to unfreeze it, since // the attribute is read-only and the admin can't simply uncheck the setting