diff --git a/plugins/content/tjreportsfields/tjreportsfields.php b/plugins/content/tjreportsfields/tjreportsfields.php index 54397be..cebcf68 100644 --- a/plugins/content/tjreportsfields/tjreportsfields.php +++ b/plugins/content/tjreportsfields/tjreportsfields.php @@ -81,6 +81,12 @@ public function __construct(&$subject, $config) */ public function onContentBeforeSave($context, $row, $isNew) { + // Run this plugin only for com_fields.field form + if ($context !== 'com_fields.field') + { + return; + } + // $context = com_fields.field JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_fields/tables'); @@ -182,6 +188,12 @@ public function onContentAfterSave($context, $field, $isNew) */ public function onContentAfterDelete($context, $field) { + // Run this plugin only for com_fields.field form + if ($context !== 'com_fields.field') + { + return; + } + // Call set custom field table name $this->setCustomFieldsTableName($field->context);