Skip to content

Commit ca32b73

Browse files
committed
Merge branch 'release/8.2.2'
2 parents ba48e27 + 6068fcb commit ca32b73

File tree

15 files changed

+71
-66
lines changed

15 files changed

+71
-66
lines changed

Classes/Controller/FormController.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -403,21 +403,6 @@ public function initializeObject()
403403
$this->signalDispatch(__CLASS__, __FUNCTION__ . 'Settings', [$this, &$this->settings]);
404404
}
405405

406-
/**
407-
* @return void
408-
* @codeCoverageIgnore
409-
*/
410-
public function initializeAction()
411-
{
412-
parent::initializeAction();
413-
414-
// @codeCoverageIgnoreStart
415-
if (!isset($this->settings['staticTemplate'])) {
416-
$this->controllerContext = $this->buildControllerContext();
417-
$this->addFlashMessage(LocalizationUtility::translate('error_no_typoscript'), '', AbstractMessage::ERROR);
418-
}
419-
}
420-
421406
/**
422407
* Forward to formAction if wrong form in plugin variables given
423408
* used for createAction() and confirmationAction()

Classes/Controller/OutputController.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
*/
3333
class OutputController extends AbstractController
3434
{
35-
3635
/**
3736
* @return void
3837
* @throws InvalidQueryException
@@ -286,24 +285,6 @@ protected function assignMultipleActions(): void
286285
$this->view->assign('editPid', $this->settings['edit']['pid']);
287286
}
288287

289-
/**
290-
* @return void
291-
*/
292-
protected function initializeAction()
293-
{
294-
parent::initializeAction();
295-
296-
// check if ts is included
297-
if (!isset($this->settings['staticTemplate'])) {
298-
$this->controllerContext = $this->buildControllerContext();
299-
$this->addFlashMessage(
300-
LocalizationUtility::translate('error_no_typoscript_pi2'),
301-
'',
302-
AbstractMessage::ERROR
303-
);
304-
}
305-
}
306-
307288
/**
308289
* Add parameters to piVars from TypoScript
309290
*

Classes/Utility/FrontendUtility.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@ public static function getCurrentPageIdentifier(): int
5151
*/
5252
public static function getSysLanguageUid(): int
5353
{
54-
/** @var SiteLanguage $siteLanguage */
55-
$siteLanguage = ObjectUtility::getTyposcriptFrontendController()->getLanguage();
56-
return $siteLanguage->getLanguageId();
54+
$tsfe = ObjectUtility::getTyposcriptFrontendController();
55+
if ($tsfe !== null) {
56+
/** @var SiteLanguage $siteLanguage */
57+
$siteLanguage = $tsfe->getLanguage();
58+
return $siteLanguage->getLanguageId();
59+
}
60+
return 0;
5761
}
5862

5963
/**
@@ -182,7 +186,7 @@ public static function getPropertyFromLoggedInFrontendUser(string $propertyName
182186
public static function getDomainFromUri(string $uri): string
183187
{
184188
$uriParts = parse_url($uri);
185-
return $uriParts['host'];
189+
return (string)$uriParts['host'];
186190
}
187191

188192
/**
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
declare(strict_types=1);
3+
namespace In2code\Powermail\ViewHelpers\Misc;
4+
5+
use In2code\Powermail\Utility\LocalizationUtility;
6+
use TYPO3\CMS\Core\Messaging\AbstractMessage;
7+
use TYPO3\CMS\Core\Messaging\FlashMessage;
8+
use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
9+
use TYPO3\CMS\Core\Utility\GeneralUtility;
10+
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
11+
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
12+
13+
/**
14+
* Class CheckForTypoScriptViewHelper
15+
* @noinspection PhpUnused
16+
*/
17+
class CheckForTypoScriptViewHelper extends AbstractViewHelper
18+
{
19+
/**
20+
* @return void
21+
*/
22+
public function initializeArguments()
23+
{
24+
parent::initializeArguments();
25+
$this->registerArgument('settings', 'array', 'settings array', true);
26+
}
27+
28+
/**
29+
* @param array $arguments
30+
* @param \Closure $renderChildrenClosure
31+
* @param RenderingContextInterface $renderingContext
32+
* @return void
33+
*/
34+
public static function renderStatic(
35+
array $arguments,
36+
\Closure $renderChildrenClosure,
37+
RenderingContextInterface $renderingContext
38+
): void {
39+
if ($arguments['settings']['staticTemplate'] !== '1') {
40+
/** @var FlashMessageQueue $flashMessageQueue */
41+
$flashMessageQueue = $renderingContext->getControllerContext()->getFlashMessageQueue(null);
42+
/** @var FlashMessage $flashMessage */
43+
$flashMessage = GeneralUtility::makeInstance(
44+
FlashMessage::class,
45+
LocalizationUtility::translate('error_no_typoscript'),
46+
'',
47+
AbstractMessage::ERROR
48+
);
49+
$flashMessageQueue->addMessage($flashMessage);
50+
}
51+
}
52+
}

Configuration/TCA/tx_powermail_domain_model_answer.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
'iconfile' => ConfigurationUtility::getIconPath(Answer::TABLE_NAME . '.gif')
2828
],
2929
'interface' => [
30-
'showRecordFieldList' =>
31-
'sys_language_uid, l10n_parent, l10n_diffsource, hidden, value, value_type, field, mail',
3230
],
3331
'types' => [
3432
'1' => ['showitem' => 'value, value_type, field, mail'],

Configuration/TCA/tx_powermail_domain_model_field.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,6 @@
229229
'iconfile' => ConfigurationUtility::getIconPath(Field::TABLE_NAME . '.gif')
230230
],
231231
'interface' => [
232-
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, type, settings, ' .
233-
'path, content_element, text, prefill_value, placeholder, create_from_typoscript, mandatory, ' .
234-
'validation, validation_configuration, css, description, multiselect, datepicker_settings, ' .
235-
'feuser_value, sender_email, sender_name, own_marker_select, auto_marker, marker',
236232
],
237233
'palettes' => [
238234
'1' => [

Configuration/TCA/tx_powermail_domain_model_form.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
'iconfile' => ConfigurationUtility::getIconPath(Form::TABLE_NAME . '.gif')
2828
],
2929
'interface' => [
30-
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, css, pages, note',
3130
],
3231
'types' => [
3332
'1' => [

Configuration/TCA/tx_powermail_domain_model_mail.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@
3939
'searchFields' => 'sender_mail, sender_name, subject, body'
4040
],
4141
'interface' => [
42-
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, ' .
43-
'crdate, receiver_mail, sender_name, sender_mail, subject, form, answers, body, ' .
44-
'feuser, spam_factor, time, sender_ip, user_agent, marketing_referer_domain, ' .
45-
'marketing_referer, marketing_country, marketing_mobile_device, ' .
46-
'marketing_frontend_language, marketing_browser_language, marketing_page_funnel',
4742
],
4843
'types' => [
4944
'1' => [

Configuration/TCA/tx_powermail_domain_model_page.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
'iconfile' => ConfigurationUtility::getIconPath(Page::TABLE_NAME . '.gif')
2929
],
3030
'interface' => [
31-
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, css, fields',
3231
],
3332
'types' => [
3433
'1' => [

Documentation/Changelog/Readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
| Version | Release Date | Description |
66
|------------ |--------------|-----------------------------------------------------------------------------------------------------------------------|
7+
| 8.2.2 | 2020-10-21 | Bugfix: Fix false positive error message in frontend "TypoScript is missing" together with marketing information |
8+
| | | Bugfix: Fix a possible type hint error logs when no referrer is available |
9+
| | | Bugfix: Fix a possible type hint exception if TSFE is not available |
710
| 8.2.1 | 2020-10-05 | Bugfix: Fix AJAX requests for hiding/enabling and deleting mails in backend module |
811
| | | Bugfix: Fix a possible type hint exception when powermail gets extended from third party extensions |
912
| | | Bugfix: Fix a possible type hint exception in Pi2 |

0 commit comments

Comments
 (0)