From d02fc86c7c28598a3a33a61397b9a8da11133301 Mon Sep 17 00:00:00 2001 From: Patrick Lenk Date: Fri, 4 Feb 2022 09:38:02 +0100 Subject: [PATCH 1/5] [TASK] Allow tt_address ^6.0 https://github.com/FriendsOfTYPO3/tt_address/blob/master/Documentation/Administration/Changelog/v/6-0-0.rst --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d4565fb37..d87689958 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require": { "typo3/cms-core": "^10.4", "friendsoftypo3/jumpurl": "^8.0", - "friendsoftypo3/tt-address": "^4.3 || ^5.0", + "friendsoftypo3/tt-address": "^4.3 || ^5.0 || ^6.0", "friendsoftypo3/rdct": "^2.0" }, "require-dev": { From 53cf8d4c27d958b0bb2a04eb02b01218f003b34f Mon Sep 17 00:00:00 2001 From: Peter Kraume Date: Fri, 29 Jul 2022 12:56:06 +0200 Subject: [PATCH 2/5] =?UTF-8?q?[BUGFIX]=C2=A0Fix=20empty=20$=5FSERVER['HTT?= =?UTF-8?q?P=5FHOST']=20in=20CLI=20context?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In CLI / Scheduler context, $_SERVER['HTTP_HOST'] can be null. This leads to a malformed URI. Resolves: #273 --- Classes/DirectMailUtility.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index d8900c4ce..cf0dcd0fa 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -1449,6 +1449,12 @@ public static function getFullUrlsForDirectMailRecord(array $row) { $cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class); // Finding the domain to use + if (!$_SERVER['HTTP_HOST']) { + // In CLI / Scheduler context, $_SERVER['HTTP_HOST'] can be null + $siteFinder = GeneralUtility::makeInstance(SiteFinder::class); + $site = $siteFinder->getSiteByPageId((int)$row['page']); + $_SERVER['HTTP_HOST'] = $site->getBase()->getHost(); + } $result = [ 'baseUrl' => $cObj->typolink_URL([ 'parameter' => 't3://page?uid=' . (int)$row['page'], From 0826950cc1c175322b6ae6d64b6d558ada4db1aa Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Wed, 21 Sep 2022 09:50:20 +0200 Subject: [PATCH 3/5] [TASK] fix composer.json so packagist can update --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index d87689958..1c2fd2776 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,6 @@ } }, "replace": { - "directmailteam/direct-mail": "self.version", "typo3-ter/direct-mail": "self.version" }, "extra": { From 86322d1c04c257909f6190161b3f876113a20a0f Mon Sep 17 00:00:00 2001 From: Patrick Lenk Date: Thu, 15 Jun 2023 10:38:02 +0200 Subject: [PATCH 4/5] [BUGFIX] Avoid undefined array key warning in StatisticsController --- Classes/Module/StatisticsController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Module/StatisticsController.php b/Classes/Module/StatisticsController.php index dd19d2251..045e8b4ff 100644 --- a/Classes/Module/StatisticsController.php +++ b/Classes/Module/StatisticsController.php @@ -643,7 +643,7 @@ protected function stats($row) ($html ? $id : '-'), ($html ? '-' : $id), ($html ? $urlCounter['html'][$id]['counter'] : $urlCounter['plain'][$origId]['counter']), - $urlCounter['html'][$id]['counter'], + $urlCounter['html'][$id]['counter'] ?? 0, $urlCounter['plain'][$origId]['counter'] ?? 0, $img, ]; @@ -1559,11 +1559,11 @@ public function getLinkLabel($url, $urlStr, $forceFetch = false, $linkedWord = ' $contentTitle = $file['file']; } } -/** +/** if ($this->params['showContentTitle'] == 1) { $label = $contentTitle; } - + if ($this->params['prependContentTitle'] == 1) { $label = $contentTitle . ' (' . $linkedWord . ')'; } From 11b4af79304f9237c22fa062a6e090bd078f7e99 Mon Sep 17 00:00:00 2001 From: Patrick Lenk Date: Thu, 15 Jun 2023 14:11:48 +0200 Subject: [PATCH 5/5] [BUGFIX] Avoid undefined array key fragment in StatisticsController --- Classes/Module/StatisticsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Module/StatisticsController.php b/Classes/Module/StatisticsController.php index 045e8b4ff..e1ea291f2 100644 --- a/Classes/Module/StatisticsController.php +++ b/Classes/Module/StatisticsController.php @@ -1533,7 +1533,7 @@ public function getLinkLabel($url, $urlStr, $forceFetch = false, $linkedWord = ' $urlParts = parse_url($url); if (!$forceFetch && (substr($url, 0, strlen($pathSite)) === $pathSite)) { - if ($urlParts['fragment'] && (substr($urlParts['fragment'], 0, 1) == 'c')) { + if ($urlParts['fragment'] ?? '' && (substr($urlParts['fragment'], 0, 1) == 'c')) { // linking directly to a content $elementUid = (int)(substr($urlParts['fragment'], 1)); $row = BackendUtility::getRecord('tt_content', $elementUid);