Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when loading form in FE with static include not active #5

Open
sypets opened this issue Dec 11, 2024 · 0 comments
Open

Exception when loading form in FE with static include not active #5

sypets opened this issue Dec 11, 2024 · 0 comments

Comments

@sypets
Copy link
Contributor

sypets commented Dec 11, 2024

In the docs, there is an option described to not include the TypoScript static include:

Do not include the TypoScript Record "Powermail Cleaner Template

https://github.com/in2code-de/powermail_cleaner/blob/v12/Documentation/Configuration/General.rst

However, when I do that, I get an exception:

PHP Warning: Undefined array key "powermail_cleaner_enabled" in /var/www/site-uol12/vendor/in2code/powermail_cleaner/Classes/Controller/FormController.php line 23

Reproduce

  1. Install powermail
  2. setup a simple working form
  3. install powermail_cleaner
  4. Do not aktivate powermail_cleaner TypoScript static include
  5. Load the form in the FE

Now the mentioned exception occurs.

in /var/www/site-uol12/vendor/in2code/powermail_cleaner/Classes/Controller/FormController.php line 23

if ((empty($this->settings['powermailCleaner']) || $this->settings['powermailCleaner']['deletionBehavior']==='') && ((int)$this->settings['powermail_cleaner_enabled'] === 1)) {

Should use ((int)($this->settings['powermail_cleaner_enabled'] ?? 0)) === 1

workaround

Activate static include, but disable:

plugin.tx_powermail.settings.setup.powermail_cleaner_enabled = 0

versions

  • latest powermail_cleaner (v12 branch)
  • TYPO3 12.4.22
  • PHP 8.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant