Files
VITEC-website/packages/fe_comment
orasche eb0d0d9ebc fe_comment: Feedback Overview content element in the page JSON
- New content element "Feedback Overview" (CType fecomment_overview):
  the current FE user's feedback state under content.feedbackOverview,
  so the overview page renders like any other page instead of a
  front-end special case
- Rendered as USER_INT inside the cached page JSON (EXT:headless replaces
  the field per request): data is per user, visitors without a session
  get {"allowed": false} - verified that nothing leaks from the cache
- One implementation for both consumers: the new FeedbackState service
  builds the state payload; the API middleware delegates to it
- State payload (API and element) gained canSubmit and actions (all
  write endpoints with method and URL), so the front end needs no
  hard-coded endpoints for the submit button below the ticket list
- New site set evomedien/fe-comment carries the TypoScript, added to the
  site configuration; icon fecomment-overview
2026-10-09 14:56:10 +02:00
..

EXT:fe_comment — page feedback widget

A floating button at the right edge of every page lets reviewers (e.g. the customer) comment on the page they are looking at. Notes collect on a local note pad (localStorage, survives navigation and SPA route changes); the pad lists every note with its URL and editable text and submits them all in one mail.

Framework-agnostic: the whole UI is one vanilla-JS file served by the extension itself — it works on a React/SPA front end and on classic TYPO3-rendered pages alike.

Endpoints (middleware, active on every site with the extension installed)

URL Purpose
/api/fe-comment/widget.js the widget (injects its own CSS)
/api/fe-comment/widget.css widget styles
/api/fe-comment/submit POST {"entries":[{"url","comment"}]} → sends the mail

Configuration (Settings → Extension Configuration → fe_comment)

  • mailTo (required) / mailCc / mailBcc — comma-separated lists. Without a valid mailTo, submissions are rejected (HTTP 503), nothing is lost silently.
  • subject — subject line, host and entry count are appended.
  • jsonOutput — 1 (default): headless mode, TYPO3 injects nothing; the front end embeds the widget itself: <script src="/api/fe-comment/widget.js" defer></script> 0: classic TYPO3 site, the extension injects the script into every rendered frontend page automatically (AssetCollector, no TypoScript).

The sender address is TYPO3's system default ($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']).

Notes for SPA setups

  • The page URL is read at SAVE time (location.pathname + search), so client-side route changes are captured correctly.
  • If page URLs are rewritten to an SPA fallback (like the vitec .htaccess phase B block), /api/ paths must stay excluded from the fallback so the endpoints keep reaching TYPO3.

Labels

UI labels are German and live in the T object at the top of Resources/Public/JavaScript/fe-comment.js.