You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using TypoScript to include a powermail form seems to work, but when sending the form, there is an exception:
PHP Warning: Undefined array key "pi_flexform" in /var/www/web-dev8/html/typo3conf/ext/powermail/Classes/Domain/Validator/AbstractValidator.php line 136
Tested using powermail 12.3.1 under TYPO3 12.4.14, the problem seems to be, that within the constructor of the class "AbstractValidator" the key "pi_flexform" of the "data" array is assumed to be existing. This however is not the case when using TypoScript to include the form - there is no content object.
Quickly changing the following lines ...
$this->flexForm = $flexFormService->convertFlexFormContentToArray(
// @extensionScannerIgnoreLine Seems to be a false positive: getContentObject() is still correct in 9.0
$configurationManager->getContentObject()->data['pi_flexform']
);
... to this ...
$this->flexForm = $flexFormService->convertFlexFormContentToArray(
// @extensionScannerIgnoreLine Seems to be a false positive: getContentObject() is still correct in 9.0
$configurationManager->getContentObject()->data['pi_flexform'] ?? ''
);
... fixes the bug.
By the way: is there an official way to include a powermail form via TypoScript? Is using the following the way to go?
321 = USER_INT
321 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Powermail
pluginName = Pi1
vendorName = In2code
controller = Form
action = form
settings {
flexform {
main.form = 123
receiver.name = name of the receiver
receiver.email = email@example.local
receiver.subject = subject of the email
receiver.body = {powermail_all}
}
}
}
The text was updated successfully, but these errors were encountered:
This is not an officially supported way to use EXT:powermail. Problably there are other extensions, that fit better into this usecase /f.e. EXT:form)
All necessary flexform values must be set in the TypoScript as mentioned here. We will not take care of any further warnings and exceptions, if you decide to include Powermail via TypoScript.
Using TypoScript to include a powermail form seems to work, but when sending the form, there is an exception:
Tested using powermail 12.3.1 under TYPO3 12.4.14, the problem seems to be, that within the constructor of the class "AbstractValidator" the key "pi_flexform" of the "data" array is assumed to be existing. This however is not the case when using TypoScript to include the form - there is no content object.
Quickly changing the following lines ...
... to this ...
... fixes the bug.
By the way: is there an official way to include a powermail form via TypoScript? Is using the following the way to go?
The text was updated successfully, but these errors were encountered: