Hallo,
versuche gerade ein processformdata hook zu erstellen. Aber beim Cache leeren kommt folgende meldung:
HTML-Code:
vendor/bin/contao-console cache:clear --no-warmup
$ /usr/bin/php8.1 -q -dmax_execution_time=0 -dmemory_limit=-1 -ddisplay_errors=0 -ddisplay_startup_errors=0 -derror_reporting=0 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=Europe/Berlin /is/htdocs/wp1140763_71ZTH1OPYN/www/Testspace//vendor/contao/manager-bundle/bin/contao-console cache:clear --env=prod --no-warmup
# Process terminated with exit code 255
# Result: Unknown error
Ich habe unter der gleichen hierachie wie "app | assets| web" etc. einen ordner src/EventListener angelegt und dort die Datei ProcessFormDataListener.php erstellt. Inhalt ist einfach der aus der Doku:
HTML-Code:
<?php
namespace App\EventListener;
use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
use Contao\Form;
#[AsHook('processFormData')]
class ProcessFormDataListener
{
public function __invoke(
array $submittedData,
array $formData,
?array $files,
array $labels,
Form $form
): void
{
echo "test";
}
}
Was mach ich denn hier schon falsch?!
Danke und Gruß
Gassi
ps. Hoster ist ein managed Server bei Hosteurope, contao 4.13.21
Lesezeichen