- New extension fe_comment (Evomedien, framework-agnostic): floating page
feedback widget served from /api/fe-comment/widget.js, note pad in localStorage, submissions mailed via /api/fe-comment/submit with recipients from the extension configuration; classic sites get the script injected via AssetCollector when the jsonOutput setting is off. An enabled master switch serves the widget EMPTY when off (no 404, no console errors) and rejects submissions - the go-live kill switch, no front-end build change needed - URL swap finished: /_json prefix middleware, SPA fallback live with a dedicated root rule (REQUEST_FILENAME of / is a directory) and a query-string exception for the TYPO3 v14 install tool entry (?__typo3_install on the site root - the backend Settings/Environment modules depend on it); /api/ as a whole stays with TYPO3 - MailMessage::send() no longer exists in v14: fe_comment and the form EmailDelivery (latently broken since the core upgrade) now send through the Mailer service. Mail transport moved to SMTP against the local exim so delivery errors surface instead of bouncing into the blackhole - exim verifies the envelope sender, which therefore must be a routable existing address (transport config lives in the untracked settings.php) - Related-product card texts editable on the product record (table rebuilt with uid/pid, TCA + inline field, one-time migration script); shared RteCompare for the module badge and the CLI comparison - batch dry-run now reports 0 writes instead of flagging every richtext field - Workbook clarification cases executed: VisionIO-SD14, VisionSC-SD14 and both Diamond OG records imported (40 fields, live-verified); ArtioSign and ArtioView created hidden (uid 109/110) via create_artio_records.php - the product table has no sorting column; WallControl_10 mapping REVERTED and parked: the dry run revealed aetria-wallcontrol already carries its own agency workbook, which WallControl_10 would have overwritten. Manifest now 75 product / 24 family / 1 open
This commit is contained in:
1 parent
6db2234851
commit
f0b0694842
28 files changed
+1272
-54
No files matched your search
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Evomedien\Vitec\Middleware;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\MiddlewareInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
|
||||
/**
|
||||
* /_json/<path> serves the TYPO3 (headless JSON) response for <path>.
|
||||
*
|
||||
* Part of the URL swap requested 2026-09-28: page URLs are for visitors
|
||||
* (the React app - the .htaccess SPA fallback of phase B), the JSON moves
|
||||
* under the /_json prefix. Apache cannot do the strip itself in a useful
|
||||
* way - TYPO3 routes by the original REQUEST_URI - so the prefix is
|
||||
* removed here, before site/page resolution; everything downstream sees
|
||||
* the plain path and behaves exactly as a direct request would. Same
|
||||
* pattern as SuccessStoryPathRewrite. The query string is untouched, so
|
||||
* /_json/?type=834 and the suggest page type work as before.
|
||||
*
|
||||
* Runs before the other vitec path middlewares: a front end that prefixes
|
||||
* ALL its calls may also send /_json/download/... or
|
||||
* /_json/api/vitec/form/... - after the strip those reach their middleware
|
||||
* unchanged, so both the prefixed and the direct form keep working.
|
||||
*
|
||||
* Exception-safe: any failure leaves the request untouched.
|
||||
*/
|
||||
final class JsonPrefixRewrite implements MiddlewareInterface
|
||||
{
|
||||
private const PREFIX = '/_json';
|
||||
|
||||
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||
{
|
||||
try {
|
||||
$path = $request->getUri()->getPath();
|
||||
if ($path === self::PREFIX || str_starts_with($path, self::PREFIX . '/')) {
|
||||
$stripped = substr($path, strlen(self::PREFIX));
|
||||
$request = $request->withUri(
|
||||
$request->getUri()->withPath($stripped === '' || $stripped === '/' ? '/' : $stripped)
|
||||
);
|
||||
}
|
||||
} catch (\Throwable) {
|
||||
// untouched request
|
||||
}
|
||||
|
||||
return $handler->handle($request);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user