in2code-de / powermail

This is the official repository of the TYPO3 extension powermail! Powermail is a well-known, editor-friendly, powerful and easy mailform extension for TYPO3
https://in2code.de
86 stars 166 forks source link

Uncaught TYPO3 Exception In2code\Powermail\Update\PowermailPluginUpdater::updateContentElement() #926

Open alandolsi opened 8 months ago

alandolsi commented 8 months ago

Error When Running Wizard "Powermail: Migrate list types and switchable controller actions to CTypes"

Uncaught TYPO3 Exception In2code\Powermail\Update\PowermailPluginUpdater::updateContentElement(): Argument #3 ($flexform) must be of type string, null given, called in /var/www/html/vendor/in2code/powermail/Classes/Update/PowermailPluginUpdater.php on line 154 thrown in file /var/www/html/vendor/in2code/powermail/Classes/Update/PowermailPluginUpdater.php in line 224

Powermail Early Access for TYPO3 v12

possible fix

image

Thank you

abvdveen commented 5 months ago

Encountered same error when upgrading Powermail. Suggested fix solves it: generates correct new instances of powermail_pi1.

vertexvaar commented 1 month ago

I suggest another patch

Index: Classes/Update/PowermailPluginUpdater.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Classes/Update/PowermailPluginUpdater.php b/Classes/Update/PowermailPluginUpdater.php
--- a/Classes/Update/PowermailPluginUpdater.php 
+++ b/Classes/Update/PowermailPluginUpdater.php (date 1717502423326)
@@ -134,7 +134,7 @@
                 }
             } else {
                 $targetCType = 'powermail_pi1';
-                $newFlexform = $record['pi_flexform'];
+                $newFlexform = $record['pi_flexform'] ?? '';
             }

             // Remove flexform data which do not exist in flexform of new plugin