powermail icon indicating copy to clipboard operation
powermail copied to clipboard

Required argument "mail" is not set when calling url without POST

Open georgringer opened this issue 1 year ago • 13 comments

when calling the URL without any post information, e.g.

kontaktformular/?tx_powermail_pi1%5Baction%5D=create&tx_powermail_pi1%5Bcontroller%5D=Form&cHash=fdab6c2d392a1856d4a5c9b0f196c252

then an excpeption is thrown

(1/1) #1298012500 TYPO3\CMS\Extbase\Mvc\Controller\Exception\RequiredArgumentMissingException
Required argument "mail" is not set for In2code\Powermail\Controller\FormController->create.

would be great if this would be supressed

georgringer avatar Feb 16 '24 07:02 georgringer

I can confirm this. I get the above error message when I call the form normally with /send or /create after it.

image

lukasdoerr avatar Feb 29 '24 06:02 lukasdoerr

Same here in TYPO3 11.5.36 with Powermail 10.7.3

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1298012500: Required argument "mail" is not set for In2code\Powermail\Controller\FormController->create. | TYPO3\CMS\Extbase\Mvc\Controller\Exception\RequiredArgumentMissingException thrown in file /var/www/typo3/public/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php in line 1044. Requested URL: https://domain.tld/unternehmen/aktuelles/news/artikel?tx_powermail_pi1%5Baction%5D=create&tx_powermail_pi1%5Bcontroller%5D=Form&cHash=1208ed4957727d58a7b8a4f44dbe5735

medarob avatar Mar 15 '24 12:03 medarob

Same here my log is full:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1298012500: Required argument "mail" is not set for In2code\Powermail\Controller\FormController->create. | TYPO3\CMS\Extbase\Mvc\Controller\Exception\RequiredArgumentMissingException thrown in file /html/typo3-composer/public/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php in line 1044. Requested URL: https://www.braunschwab.de/kontakt?tx_powermail_pi1%5Baction%5D=create&tx_powermail_pi1%5Bcontroller%5D=Form&cHash=d8460c1e31d6aed8899d2e102eb2cc0f 

daUhradone avatar Mar 15 '24 19:03 daUhradone

~~Possible fix? #881~~

Nope it's not.

The return new ForwardResponse('form'); in \In2code\Powermail\Controller\FormController::forwardIfMailParamEmpty does not work properly.

coding46 avatar Mar 25 '24 18:03 coding46

A fix will be in the next release for Powermail V10 / TYPO3 V11

mschwemer avatar Apr 17 '24 15:04 mschwemer

@mschwemer When can we expect a release on this fix please?

siwa-sgjatoja avatar May 08 '24 12:05 siwa-sgjatoja

@siwa-sgjatoja hehe... I was working on the issue, while you were asking ;-)

The releases were published a couple of minutes ago.

mschwemer avatar May 08 '24 14:05 mschwemer

Fix is in the releases 10.8.1 (for TYPO3 v11) and 12.3.2 (for TYPO3 v12)

mschwemer avatar May 08 '24 14:05 mschwemer

@mschwemer calling the same URL still triggers exception "Required argument "mail" is not set for In2code\Powermail\Controller\FormController->create." using 12.3.2 on a v12 instance

georgringer avatar May 13 '24 12:05 georgringer

@georgringer Weird ... if I try to reproduce it, in the development environment, it works as expected.

  • Powermail v12.3.2
  • TYPO3 v12.4.15

Can you verify that with the ddev developement environment?

mschwemer avatar May 21 '24 07:05 mschwemer

I re-open this issue, since I (probably) introduced another issue with my solution. See: #1052

mschwemer avatar Aug 21 '24 14:08 mschwemer