Default Captcha doesn't work with TYPO3 9
Hello,
we use powermail 7.3.1 and TYPO3 9.5.9. When we use default Captcha we get the error: "Wrong captcha code entered - please try again!". It seems that the generated captcha value isn't saved in the session.
Pls. give me some more information about the configuration in the plugin. Do you use a confirmation page? If so, does the failure also came up with disabled confirmation page?
There's nothing special about the config. I use default options for the plugin, so without a confimation page.
Hello, do you need any further information?
Hello, we are using Typo3 9.5.16 and Extension Powermail 7.4.0 which is the latest supported version for Typo3 9.5.
Every form contains a captcha element.
Submitting a form in the default website language works without problems. Our website is translated to several languages.
In a translated language, it's not possible to submit a powermail form. When clicking the submit button, you get an error "Wrong captcha code entered - please try again!", although the right captcha code was entered.
Hello, are there any news regarding this issue?
With latest Typo3 Core 9.5.19 and Powermail 7.4.0 the problem still exists.
I am having same issue, It gives me "Captcha: Falscher Captcha Code eingetragen, bitte erneut versuchen!" error every time for correct input of captcha expression.
I am using powermail 7.4.0 in TYPO3 9.5.7

Hi people!
I came across the same issue and tried to investigate the causes of issue. I found if I remove below rewrite rule from .htaccess
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.*$ %{ENV:CWD}index.php [QSA,L]
...then it's working correctly and form submission will succeed. But, this will lead you to another problem. As rewrite rule above redirect you to index.php if the file/symlink/directory does not exist, So this won't work. Now, your home page will work fine but inner pages will lead you to 404 error.
Here is my apache configuration for virtual host:
<VirtualHost *:443>
ServerName www.relaunch.typo-site.de
ServerAlias relaunch.typo-site.de
<Directory "/var/www/html/relaunch">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>```
That's what I found the issue with, @einpraegsam this can be helpful for check in-depth.
Hi,
I tested it with TYPO3 V10 and the current Powermail release, with TYPO3 V9 and Powermail 7.4.2. I also tested translated forms with the default captcha.
I cannot reproduce the issue.
Can you please provide more information about your setups? Site and lanuage configuration, typoscript settings, ...
Hi, Just stumbled upon the same issue and debugged the problem. In the Sites configuration the fallbackType is set to 'strict'. The Powermail form (and page and fields) were not translated; only records in the default language are available.
In \In2code\Powermail\Domain\Repository\FieldRepository::findByMarkerAndForm() Powermail sets setRespectSysLanguage(false) which makes sure that the form/page/field can be found. However, Extbase performs a workspace and language overlay handling for those records. And with the fallbackType set to strict it acts like the old config.sys_language_overlay = hideNonTranslated setting. Because there is no translated form/page/field available the field record is emptied.
Because there is no field record, the answer for that field is not stored in the mail object and thus the validators will complain about missing values for mandatory fields, incorrect captcha values, etcetera.
It already looks like Powermail wants to be able to use form definitions from the default language in other languages, so it might be handy to add $query->getQuerySettings()->setLanguageOverlayMode(true); to that function to prevent untranslated form/page/field records from being ignored while building the answers list.