Files
typo3-13/config/system/additional.php
T
frommeandClaude Opus 5.5 925e24397b feat: forms on TYPO3 13, loaded into the static pages with htmx
The static export replaced every EXT:form form with a contact notice. The
forms are back, rendered by TYPO3 13 and embedded in the static pages:

- Page type 1704 (/<page>/form) renders only the form plugin of a page,
  inside a .form-island element. Every form posts to that URL
  (renderingOptions.additionalParams), because on www the page URL is a
  static file that never reaches TYPO3. htmx swaps the island in place:
  validation errors, multi-step pages and confirmations. A redirect to an
  htmx request becomes HX-Redirect (HtmxRedirectMiddleware), so Redirect
  finishers send the browser to the thank-you page.
- While a request runs, an overlay with a spinner (as in MyE&P) covers
  the form. Styled inside the island: the static pages load the CSS of
  the TYPO3 10 export.
- The bw_captcha image comes from /<page>/captcha for the same reason.
  Both suffixes are in the PageType enhancer of every site with forms
  (semesterende gets one with default '' to keep its URLs).
- Ported from TYPO3 10: form setup, templates and partials, the MyE&P
  address finisher, the job application finisher with the MyE&P Team
  API client (epTeamApi* in secrets.php), the page URL/referrer finisher
  with ReferrerMiddleware (?ref=), the e-mail layout without the system
  footer, bw_captcha 5 and form_element_linked_checkbox 6. The address
  check forms are dropped.
- German language packs (EXT:form messages): availableLanguages = de,
  fetched on every deploy (typo3:language:update).
- The checkbox partials passed null to VHS' substring, which PHP 8.5
  reports as deprecated.
- DDEV no longer turns deprecations into exceptions, matching
  production: EXT:form's RenderFormValueViewHelper uses null as an array
  offset for empty optional fields (core bug, also in 13.4.37).

The static pages get their placeholders from the exporter in EP/website,
see .ddev/plans/static-export-form-islands.patch (local only).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 12:10:43 +02:00

87 lines
3.2 KiB
PHP

<?php
// Maintained in Git (taken over from DDEV's generated file): DDEV settings locally, secrets
// from secrets.php everywhere. Empty secret values leave settings.php untouched.
if (getenv('IS_DDEV_PROJECT') == 'true') {
$GLOBALS['TYPO3_CONF_VARS'] = array_replace_recursive(
$GLOBALS['TYPO3_CONF_VARS'],
[
'DB' => [
'Connections' => [
'Default' => [
'dbname' => 'db',
'driver' => 'mysqli',
'host' => 'db',
'password' => 'db',
'port' => '3306',
'user' => 'db',
],
],
],
// This GFX configuration allows processing by installed ImageMagick 6
'GFX' => [
'processor' => 'ImageMagick',
'processor_path' => '/usr/bin/',
'processor_path_lzw' => '/usr/bin/',
],
// This mail configuration sends all emails to mailpit
'MAIL' => [
'transport' => 'smtp',
'transport_smtp_encrypt' => false,
'transport_smtp_server' => 'localhost:1025',
],
'SYS' => [
'trustedHostsPattern' => '.*.*',
'devIPmask' => '*',
'displayErrors' => 1,
// Warnings are exceptions locally: they are how PHP 7.4 leftovers show up. Deprecations
// are not (production neither): PHP 8.5 deprecations in vendor code, e.g. EXT:form's
// RenderFormValueViewHelper, would break requests that work in production. They are
// still written to the deprecation log.
'exceptionalErrors' => E_WARNING | E_RECOVERABLE_ERROR,
],
'BE' => [
'debug' => true,
],
'FE' => [
'debug' => true,
],
'LOG' => [
'TYPO3' => [
'CMS' => [
'deprecations' => [
'writerConfiguration' => [
'notice' => [
\TYPO3\CMS\Core\Log\Writer\FileWriter::class => ['disabled' => false],
],
],
],
],
],
],
]
);
}
// Deployer creates an empty secrets.php if none exists yet: only an array counts
$secrets = is_file(__DIR__ . '/secrets.php') ? require __DIR__ . '/secrets.php' : null;
if (is_array($secrets)) {
$withoutEmptyValues = static function (array $values) use (&$withoutEmptyValues): array {
foreach ($values as $key => $value) {
if (is_array($value)) {
$values[$key] = $withoutEmptyValues($value);
} elseif ($value === '' || $value === null) {
unset($values[$key]);
}
}
return $values;
};
$GLOBALS['TYPO3_CONF_VARS'] = array_replace_recursive(
$GLOBALS['TYPO3_CONF_VARS'],
$withoutEmptyValues($secrets)
);
unset($withoutEmptyValues);
}
unset($secrets);