Fix thanks and error page routing for both languages
All checks were successful
Deploy / Deploy to Production (push) Successful in 7s

- Add dedicated routes for /thanks, /error, /en/thanks, and /en/error
- Create missing error.en.txt content file
- Add title to error.fr.txt

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-01-21 11:19:48 +01:00
parent 7575e5adbc
commit 4b7062e0bd
3 changed files with 48 additions and 1 deletions

View file

@ -0,0 +1,5 @@
Title: Error
----
Template: default

View file

@ -1 +1,5 @@
Uuid: kcrqkszqasludg2h Title: Erreur
----
Uuid: kcrqkszqasludg2h

View file

@ -37,6 +37,44 @@ return [
return null; return null;
} }
], ],
// English thanks page
[
'pattern' => 'en/thanks',
'action' => function() {
$thanks = page('thanks');
if ($thanks) {
site()->visit($thanks, 'en');
return $thanks;
}
return null;
}
],
// English error page
[
'pattern' => 'en/error',
'action' => function() {
$error = page('error');
if ($error) {
site()->visit($error, 'en');
return $error;
}
return null;
}
],
// French thanks page
[
'pattern' => 'thanks',
'action' => function() {
return page('thanks');
}
],
// French error page
[
'pattern' => 'error',
'action' => function() {
return page('error');
}
],
// French products (default) // French products (default)
[ [
'pattern' => '(:any)', 'pattern' => '(:any)',