? NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
16 May 2019

First part of Merging Joomla 3.9.3 - all of January's commits

Merge with a merge commit. don't squash or rebase

avatar wilsonge wilsonge - open - 16 May 2019
avatar wilsonge wilsonge - change - 16 May 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 May 2019
Category Administration SQL com_admin Postgresql com_checkin com_contact com_content com_menus com_newsfeeds com_tags com_users Language & Strings Modules JavaScript Repository NPM Change Front End Installation Libraries
avatar wilsonge wilsonge - change - 16 May 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-05-16 21:26:44
Closed_By wilsonge
Labels Added: ? NPM Resource Changed ?
avatar wilsonge wilsonge - close - 16 May 2019
avatar wilsonge wilsonge - merge - 16 May 2019
avatar infograf768
infograf768 - comment - 17 May 2019

@wilsonge
Class 'JEventDispatcher' not found when Checkin items

avatar infograf768
infograf768 - comment - 17 May 2019

The code is present in CheckinModel.php and Table.php

avatar infograf768
infograf768 - comment - 17 May 2019

for the Checkin Model, looks straightforward

diff --git a/administrator/components/com_checkin/Model/CheckinModel.php b/administrator/components/com_checkin/Model/CheckinModel.php
index 44b819b..4688537 100644
--- a/administrator/components/com_checkin/Model/CheckinModel.php
+++ b/administrator/components/com_checkin/Model/CheckinModel.php
@@ -92,6 +92,4 @@
 		$results = 0;
 
-		$dispatcher = \JEventDispatcher::getInstance();
-
 		foreach ($ids as $tn)
 		{
@@ -120,5 +118,5 @@
 			{
 				$results = $results + $db->getAffectedRows();
-				$dispatcher->trigger('onAfterCheckin', array($tn));
+				Factory::getApplication()->triggerEvent('onAfterCheckin', array($tn));
 			}
 		}

Not sure for Table.php as we also have a $this->getDispatcher()->dispatch('onTableAfterCheckin', $event);

		$this->getDispatcher()->dispatch('onTableAfterCheckin', $event);

		//$dispatcher = \JEventDispatcher::getInstance();
		Factory::getApplication()->triggerEvent('onAfterCheckin', array($this->_tbl));
avatar wilsonge
wilsonge - comment - 17 May 2019

Thanks! Patched the checking as suggested with 0fcf184 - I need to investigate the other one. onTableAfterCheckin would have been new in j4. so we'll need to rename it to the new j3 one. But that involves a little bit more work because of the event class used

Add a Comment

Login with GitHub to post a comment