v4.2.0 Feature release
Over the past few months, the TYPO3 Headless repository witnessed a mixture of enhancements, optimizations, and bug fixes. Key implementations include a mixed mode for headless, JSON Content Object handling improvements, and various TypoScript refinements.
❗ Introduce headless mixed mode and redesign headless mode setting ❗
The patch introduces a new method to determine whether the application is operating in headless mode.
Available Settings:
- Not Enabled: Headless mode is deactivated.
- Mixed Mode: Fluid and headless operate concurrently.
- Fully Headless Mode: Headless mode is fully activated.
To set up headless mode, utilize the site configuration flag as shown below:
'headless': 0|1|2
While the legacy flag (true|false) is still recognized, transitioning to the integer notation is recommended.
Options:
- 0 (formerly: false) = headless mode is deactivated for the site within the TYPO3 instance.
- 1 (formerly: true) = headless mode is fully activated for the site within the TYPO3 instance.
- 2 = mixed mode headless is activated (both fluid & json API are accessible within a single site in the TYPO3 instance).
Options 0 (formerly: false) or 1 (formerly: true) inform the extension to either fully disable or enable headless mode for a particular site.
To Enable Mixed Mode:
For a chosen site in TYPO3, follow these steps:
- In the typoscript template for the site, load the "Headless - Mixed mode JSON response" setup file instead of the default headless one.
- Set
headlessflag to a value of2in the site configuration file or configure the flag via editor in the Site's management backend.
The mixed mode flag (value of 2) instructs the EXT:headless extension to additionally check for the Accept header with a value of application/json when processing requests to the particular site in the TYPO3 instance.
- In cases where a request lacks the
Acceptheader orAccepthas a different value thanapplication/json, TYPO3 will respond with HTML content (standard TYPO3's response). - In cases where a request's header
Acceptmatches the value ofapplication/json, TYPO3 will respond with a JSON response.
❗ Changelog ❗
Features
- 🚀 [PoC][FEATURE] Introduce mixed mode for headless (#578) - @twoldanski (Oct 27, 2023)
- 🎉 [FEATURE] PageTitle handler for headless (#628) - @twoldanski (Sep 15, 2023)
- 🎉 [FEATURE] Add option "ifEmptyUnsetKey" to JSON cObject (#650) - @bmack (Oct 2, 2023)
Tasks
- ✅ [TASK] Add tests for ifEmptyUnsetKey in JSON Content Object (#657) - @twoldanski (Oct 2, 2023)
- ✅ [TASK] Typoscript improvements (#643) - @twoldanski (Oct 2, 2023)
- ✅ [TASK] Improve redirect handling (#638) - @twoldanski (Aug 30, 2023)
- ✅ [TASK] Fix tests & code style (#639) - @twoldanski (Aug 30, 2023)
- ✅ Add contributing stats (#635) - @lukaszuznanski (Jul 26, 2023)
- ✅ Add templates (#633) - @lukaszuznanski (Jul 25, 2023)
Bug Fixes
- 🐛 [BUGFIX] Fixes for php-cs-fixer, also fix files (#656) - @lukaszuznanski (Oct 2, 2023)
- 🐛 [BUGFIX] Set correct typoscript key for categories (#646) - @KrohnMi (Sep 13, 2023)
- 🐛 FIX: Deprecated: Do not provide $request as third argument to start()… - @kitzberger (Aug 29, 2023)
- 🐛 [FIX] Import custom GalleryProcessor instead of processor from fluid... - @parallaxis-mcgoldrick (Jul 26, 2023)
Documentation
Miscellaneous
- 🔄 Bump actions/checkout from 3 to 4 (#645) - @dependabot and @lukaszuznanski (Sep 13, 2023)
- 🎉 [FEATURE] Use shared TypoScript lib for headless pages (#651) - @schloram (Sep 15, 2023)
- 🔄 Early if for JSON (#626) - @kitzberger (Aug 30, 2023)
Contributors
We would like to extend our sincere appreciation to all the contributors for their valuable contributions to the TYPO3 Headless repository. Special thanks to @twoldanski, @bmack, @KrohnMi, @schloram, @dependabot, @parallaxis-mcgoldrick, and @kitzberger for their notable efforts 🚀