diff --git a/modules/backend/traits/InspectableContainer.php b/modules/backend/traits/InspectableContainer.php index 62ddb6295..982ca11b9 100644 --- a/modules/backend/traits/InspectableContainer.php +++ b/modules/backend/traits/InspectableContainer.php @@ -15,6 +15,9 @@ trait InspectableContainer { public function onInspectableGetOptions() { + // Disable asset broadcasting + $this->flushAssets(); + $property = trim(Request::input('inspectorProperty')); if (!$property) { throw new ApplicationException('The property name is not specified.'); @@ -30,7 +33,7 @@ trait InspectableContainer throw new ApplicationException('The options cannot be loaded for the specified class.'); } - $obj = new $className(null); + $obj = new $className; // Nested properties have names like object.property. // Convert them to Object.Property. diff --git a/modules/backend/widgets/Table.php b/modules/backend/widgets/Table.php index 9d0e53b1e..7b2f6261f 100644 --- a/modules/backend/widgets/Table.php +++ b/modules/backend/widgets/Table.php @@ -200,8 +200,8 @@ class Table extends WidgetBase public function onServerGetRecords() { - // Disable assets - $this->controller->clearAssetDefinitions(); + // Disable asset broadcasting + $this->controller->flushAssets(); if ($this->isClientDataSource()) { throw new SystemException('The Table widget is not configured to use the server data source.'); diff --git a/modules/system/traits/AssetMaker.php b/modules/system/traits/AssetMaker.php index 4d3d0d6d6..4cd2f9f8d 100644 --- a/modules/system/traits/AssetMaker.php +++ b/modules/system/traits/AssetMaker.php @@ -31,7 +31,7 @@ trait AssetMaker * by specifically targeting the hasAssetsDefined method. * @return void */ - public function clearAssetDefinitions() + public function flushAssets() { $this->assets = ['js'=>[], 'css'=>[], 'rss'=>[]]; }