From 112b48f608b4ad8117192eb7aa70a95546e98dd6 Mon Sep 17 00:00:00 2001 From: "sachin_s@techjoomla.com" Date: Mon, 30 Oct 2023 11:47:23 +0530 Subject: [PATCH] Bug #207382 Fixed: When a registered and authorized user is creating a new event, he/she is getting error after saving the event: UserFactory not set in Joomla\Component\Actionlogs\Administrator\Model\ActionlogModel --- tjreports/plugins/actionlog/tjreports/tjreports.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tjreports/plugins/actionlog/tjreports/tjreports.php b/tjreports/plugins/actionlog/tjreports/tjreports.php index 36e1312..2b29b42 100644 --- a/tjreports/plugins/actionlog/tjreports/tjreports.php +++ b/tjreports/plugins/actionlog/tjreports/tjreports.php @@ -66,7 +66,12 @@ class PlgActionlogTjreports extends CMSPlugin */ protected function addLog($messages, $messageLanguageKey, $context, $userId = null) { - if (JVERSION >= '4.0') + if (JVERSION >= '4.4.0') + { + $model = Factory::getApplication()->bootComponent('com_actionlogs') + ->getMVCFactory()->createModel('Actionlog', 'Administrator', ['ignore_request' => true]); + } + else if (JVERSION >= '4.0') { $model = new ActionlogModel; }