- Sep 15, 2024
-
-
Elias Häußler authored
The TSFE->cacheExpires property was removed in #102422. This patch removes an existing property access and replaces it with its successor in PrepareTypoScriptFrontendRendering middleware. Resolves: #104975 Related: #102422 Releases: main Change-Id: I106209ac5aa896abdd7838f6922cbb20f8411106 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86105 Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de>
-
- Sep 14, 2024
-
-
Sascha Nowak authored
A new API has been introduced to collect cache tags and their lifetime during frontend rendering. This API is used in the core to collect cache tags from page cache and content object cache. The API is implemented as a new PSR-7 request attribute `frontend.cache.collector` to remove the dependency from TSFE. Every cache tag has a lifetime. The minimum lifetime is calculated from all given cache tags. API users don't have to deal with it individually. The default lifetime for a cache tag is 86400 seconds (24 hours). The current TSFE api is deprecated in favor of the new API as the current API implementation does not allow to set a lifetime and extension authors have to workaround it. The TSFE api will be removed with the next major version. The frontend employs the following strategy: A relatively early middleware adds an empty new cacheDataCollector instance as attribute to request. Extensions rendering code based on database records can then add cache tags t...
-
- May 27, 2024
-
-
Christian Kuhn authored
Using PHP attributes to configure DI within classes directly is more easy to understand since developers don't need to constantly look up DI configuration Services.yaml files, but have everything in one place. The patch switches all classes that previously used '@cache.xy' to get a specific cache injected to an `Autowire` attribute. Resolves: #103921 Releases: main Change-Id: I16b064242cdbc2bbcfbed89700c97afac012fdf8 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84406 Tested-by:
Benjamin Franzke <ben@bnf.dev> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Benjamin Franzke <ben@bnf.dev> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech>
-
- Mar 19, 2024
-
-
Christian Kuhn authored
In version 12, the introduction of the new TypoScript parser was accompanied by the implementation of factories for PageTsConfig and UserTsConfig. A factory for Frontend TypoScript has not been added, though: Frontend TypoScript creation ended up in TSFE->getFromCache(). At this point, establishing a proper factory was unfeasible due to the numerous dependencies of TypoScript creation to TSFE internals. With recent refactorings around TSFE, coupled with lots of state now being represented as request attributes, it's now possible to decompose getFromCache() and establish a FrontendTypoScriptFactory. getFromCache() is a complex beast: It influences Frontend rendering performance a lot, and tries to trigger the least amount of calculations, especially in 'fully cached pages' context. This results in high required complexity due to lots of state with diverse cross dependencies. The method composes of three main steps: 1. Bootstrap TypoScript setting ("constants") and calculate setup condition verdicts. This creates required TypoScript related state needed to calculate the page cache identifier. 2. Access page cache, lock page rendering if needed, and see if a possible page cache content contains uncached ("_INT") sections. 3. Calculate at least setup "config." depending on given type/typeNum, but create full TypoScript setup if a cached page contains uncached sections or could not be retrieved from cache. The patch extracts parts 1 and 3 to FrontendTypoScriptFactory. Part 2 is moved into PrepareTypoScriptFrontendRendering middleware. This approach allowed these related refactorings: * The release of rendering locks is now consolidated within the PrepareTypoScriptFrontendRendering middleware. This guarantees locks are released, even in scenarios where lower middleware components encounter errors. This addresses an issue where locks retained during crashes, leading to deadlock situations in subsequent requests. * Dependencies to TSFE within ext:redirects RedirectService are reduced, and it no longer locks page rendering. * The Extbase BackendConfigurationManager utilizes the new factory, eliminating the need for its own implementation. The patch unlocks further refactorings: It especially allows removing the cache related properties from TSFE by representing them as request attributes. Subsequent patches will address this task accordingly. Resolves: #103410 Related: #97816 Related: #98914 Related: #102932 Releases: main Change-Id: I7fd158cffeebe6b2c64e0e3595284b8780fb73cf Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83179 Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Garvin Hicking <gh@faktor-e.de> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Garvin Hicking <gh@faktor-e.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
-
- Jan 26, 2024
-
-
Christian Kuhn authored
Frontend TypoScript has two special details, next to 'configuration' ("constants") and 'setup'. First, there is the determined "PAGE" object that depends on type / typeNum. It allows to render multiple different variants of a pages content. Historically, this has often been a "print" view, nowadays, this is usually a "json" variant, or some XML for sitemaps. A frontend is not rendered without a proper PAGE object. The FE rendering chain determines the given 'type' and maps it to a configured PAGE with this 'typeNum', defaulting to zero '0'. The patch models the determined PAGE object to the Request attribute 'FrontendTypoScript' now, which is used by FE RequestHandler to manage rendering of this PAGE type. Second special thing is 'config' TypoScript as top-level 'config' settings. Those can be overridden by the specific PAGE object (often 'page.config'). A typical use case is 'json.config.disableAllHeaderCode = 1'. This "merged" 'config' array has been available as TSFE->config['config'] before. The patch makes the merged config available in the 'FrontendTypoScript' object as well, available in the Request object as 'frontend.typoscript' attribute. The patch adapts all usages of TSFE->config['config'] to the attribute. There is a special quirk with 'config': This part of TypoScript 'setup' is so important, that it needs to be available in 'fully cached page' scenarios as well, to for instance decide if a content-length header should be added to the response. This has been the reason 'config' has been cached along with page cache content in 'page' cache before. The patch changes this and adds dedicated cache entries for 'merged config' in the (file based) 'typoscript' cache. This reduces page cache size a bit and allows re-using these 'config' cache accross different pages when they are identical, which is determined by the cache identifiers. All these changes are logical follow-ups to the TypoScript parser that has been implemented with v12. They pave the way to extract TypoScript calculation from TypoScriptFrontendController with upcoming patches. Next to this refactoring, the existing hooks in this area had to fall, especially to get rid of their dependency to "pObj" TypoScriptFrontendController. They are mostly substituted by new events, details are documented with the .rst files and class comments. The patch reduces usages of $GLOBALS['TSFE'] and usages of TypoScriptFrontendController in general. $GLOBALS['TSFE']->config['config'] is still available as b/w compat layer (a dedicated deprecation will follow), but core usages have been removed. This became a bit complicated with TimeTrackerInitialization and WorkspacePreview middlewares: Both are run before the final TypoScript 'config' is determined, so they do not have that attribute attached to their incoming Request. But they still need to know TS 'config' details to decide on details *after* calling lower handle() middlewares. They by now accessed $GLOBALS['TSFE'], which is (still) set by a lower middleware. To avoid this indirect state usage, these middlewares now register an event listener that is dispatched after TypoScript 'config' has been determined, and set local state to know if they should add additional Response data. Resolves: #102932 Releases: main Change-Id: I8282f7a93fe9594e78865db63a3e656cc4d5f8da Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82522 Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
-
- Oct 24, 2023
-
-
Christian Kuhn authored
It's time to update to latest changes of php-cs-fixer to align with current community rules. This brings a rather huge series of changes, main changes due to single_line_empty_body rule which now formats empty class and method body curly braces into a single line, plus changes from function_declaration rule which tends to avoid more whitespaces. The change has a slight impact on phpstan, we regenerate baseline. To reduce backport headaches, this change is backported to v12 and v11. > composer req --dev friendsofphp/php-cs-fixer:^3.35.1 > Build/Scripts/runTests.sh -s cgl > Build/Scripts/runTests.sh -s phpstanGenerateBaseline Resolves: #102236 Releases: main, 12.4, 11.5 Change-Id: Iea45b10667951672b2194033216c49f580799f55 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81512 Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Jasmina Ließmann <minapokhalo+typo3@gmail.com> Reviewed-by:
Jasmina Ließmann <minapokhalo+typo3@gmail.com>
-
- Apr 20, 2023
-
-
Torben Hansen authored
This change removes several unused imports, which are not detected by php-cs-fixer, since the NoUnusedImportsFixer does not ignore references used in php doc comments. Resolves: #100673 Releases: main Signed-off-by:
Torben Hansen <derhansen@gmail.com> Change-Id: Ibab8cf846eba748ea08b3254415921fd268a2021 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78757 Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
- Oct 25, 2022
-
-
Christian Kuhn authored
The patch introduces the new request attribute TypoScriptRequestAttribute as 'frontend.typoscript'. It is set up in the Frontend middleware chain, extensions and content objects can use this attribute to retrieve TypoScript settings and setup. This obsoletes usages of TSFE->tmpl, the patch switches usages to the request attribute. Note we're also establishing a better wording: The old TypoScript 'constants' are now called 'settings'. This matches much better, should avoid confusion for newcomers and is in line with further renaming of a vaguely anticipated new 'constants editor' towards 'settings editing' or similar. Further patches in this naming area will follow. Change-Id: Ib6ffb91db9bf0976f39759b12983d78418d64efa Resolves: #98914 Releases: main Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76239 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by: Christian Kuhn...
-
- Oct 03, 2022
-
-
Christian Kuhn authored
This switches from TemplateService to new TypoScript parser logic in TypoScriptFrontendController. The central methods getFromcache() and getConfigArray() were called in PrepareTypoScriptFrontendRendering after each other: getConfigArray() is now merged into getFromcache() directly. One main goal is to get rid of the 'pagesection' cache and leverage the new cache strategy of the new TypoScript parser: This cache strategy is more effective and allows caching TypoScript between different pages. We essentially get rid of the pagesection query load, but instead need the list of relevant sys_template rows early, which is done with a single query. This code is moved out of IncludeTree/TreeBuilder to new class IncludeTree/SysTemplateRepository, since the result is now needed to build page cache identifiers and thus must be exposed. An event is added as well, for extensions like ext:bolt to manipulate sys_template rows resolving. The old runThroughTemplatesPostProcessing hook is marked @internal now and will vanish during further v12 development when testing-framework has been changed to deal with it. The central getFromcache() is much better documented and should be far easier to understand now. Some parts of the code are currently a bit naive and there is quite a bit potential to further optimize parsetime especially in "full cached" scenarios. We also have the potential to make USER_INT parsing significantly quicker. Dedicated patches will follow with continued v12 development. The patch also sets a couple of properties to @internal, and marks the old TypoScriptParser and TemplateService @deprecated, even though it is currently still used for instance for TSconfig parsing, which will switch to the new parser soon as well. Resolves: #98503 Related: #97816 Releases: main Change-Id: I904e9add4a425479df4a6768a1d63a54d7b252d8 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75944 Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Benni Mack <benni@typo3.org>
-
- Mar 03, 2022
-
-
Benni Mack authored
This removes the option config.metaCharset and the conversion of content everywhere. The public method "TSFE->convOutputCharset" is gone. The property "config.metaCharset" has no effect anymore. Resolves: #97065 Releases: main Change-Id: I657b68adeba3501612ae0959fe54bdeb6470305c Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73698 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Susanne Moog <look@susi.dev> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Benni Mack <benni@typo3.org>
-
- Sep 16, 2021
-
-
Simon Schaufelberger authored
With the introduction of #94402 error pages are fetched via a sub-request. Manual "page not found" ErrorController invocations within an extbase action then resulted in rendering the originally requested page instead of the defined 404 page. This happened because the PrepareTypoScriptFrontendRendering middleware hold a reference to the outer TSFE instance which contains the original page id. Instead of injecting the stateful TSFE (which is generally discouraged), TSFE in now passed as request attribute. The container will log an according warning message from now on. Resolves: #95174 Releases: master Change-Id: Ieda58e2bef8f08762fcba06b76df03aff7b10d5c Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71084 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Simon Gilli <typo3@gilbertsoft.org> Tested-by:
Benjamin Franzke <bfr@qbus.de> Reviewed-by:
Simon Gilli <typo3@gilbertsoft.org> Reviewed-by:
Benjamin Franzke <bfr@qbus.de>
-
- Aug 30, 2021
-
-
Larry Garfield authored
There are many reasons to not issue a second HTTP request for error pages and instead issue an in-process subrequest. This patch makes that change, and refactors PageContentErrorHandler a bit while there. Resolves: #94402 Releases: master Change-Id: I6da9d753bebc0ef038278185629433587a9b7162 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69547 Tested-by:
Benjamin Franzke <bfr@qbus.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Benjamin Franzke <bfr@qbus.de> Reviewed-by:
Benni Mack <benni@typo3.org>
-
- Aug 10, 2020
-
-
Benni Mack authored
This change moves the language evaluation of a page record much earlier in the frontend process. Before: * Resolve the page (determineId) based on permissions, visibility etc. * get TypoScript from Cache * Find a translation of the page and determine the content language Now: * Resolve the page based on permissions, visibility etc * Find the translation of the page * Get TypoScript from Cache This is a breaking change, as the hooks within settingLanguage() are now called at a different time of the processing logic for a frontend request, however it solves an issue that you can now use localized values for TypoScript conditions. Resolves: #23736 Releases: master Change-Id: Ia2db0233ce6680ae1cbcddb81574a41fa6333abf Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65044 Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Benni Mack <benni@typo3.org>
-
- Jun 05, 2020
-
-
Benni Mack authored
In order to reduce the amount of accessing globals in the future, and especially TYPO3_REQUEST which was born because of missing structure of TYPO3 Core, the currrent request object is now handed in (optionally) to methods, to work directly with them in TSFE context. Resolves: #91568 Releases: master, 10.4 Change-Id: I760dbd70c9748d69c669bc6f65d65d20dd8ab530 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64662 Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Frank Nägler <frank.naegler@typo3.org> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Frank Nägler <frank.naegler@typo3.org>
-
- Apr 15, 2020
-
-
Alexander Schnitzler authored
With this patch, the header comment of php files is automatically added by the php-cs-fixer, which guarantees that its format and place of occurrence remain the same in all files. Files that are copied over from other projects are excluded. Furthermore, files that are kind of inspired by other projects also get the same header comment but may have a second, additional comment explaining its origin. Used command: bin/php-cs-fixer fix --config=Build/php-cs-fixer/header-comment.php Releases: master Resolves: #91024 Change-Id: I5a040517e0fbde6e5a27d589bf2f222078326dc8 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64159 Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Benni Mack <benni@typo3.org>
-
- Apr 14, 2020
-
-
Benni Mack authored
This change adds two changes 'blank_line_after_opening_tag' => true, 'single_trait_insert_per_statement' => true, to our PHP-CS Fixer configuration, adopting more rules related to PSR-12. Resolves: #91020 Releases: master Change-Id: I180b2cbceb077911bddeb42d9f131e5b32244ed2 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64158 Tested-by:
Josef Glatz <josefglatz@gmail.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Alexander Schnitzler <git@alexanderschnitzler.de> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
TYPO3com <noreply@typo3.com> Reviewed-by:
Josef Glatz <josefglatz@gmail.com> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Alexander Schnitzler <git@alexanderschnitzler.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
- Apr 13, 2020
-
-
Alexander Schnitzler authored
As a preparation to be compatible with PSR-12, all spaces in strict type declerations are removed. Releases: master Resolves: #91009 Change-Id: I2b7c2fda42b44168b5c4c6b21711eede2eadaf2e Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62104 Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
- Mar 28, 2020
-
-
Benni Mack authored
Some minor details are changed within TSFE. - metaCharset is now evaluated at the same time as other TypoScript options making this option available earlier in the process - getFromCache() and headerNoCache() now optionally receive a PSR-7 request to evaluate serverParams from the PSR-7 request and not the superglobals Resolves: #90853 Releases: master Change-Id: I443925c5d056db10cafb4e81aa30fc7db91c3c71 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63948 Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Susanne Moog <look@susi.dev> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de>
-
- Aug 06, 2019
-
-
Benjamin Franzke authored
Use constructor injection for middleware dependencies, moving away from GeneralUtility::makeInstance based Singleton lookup. Dependencies which are already configured to be optionally injectable via constructor arguments (e.g. for unit tests) are changed to be required constructor arguments. Since the introduction of symfony dependency injection the fallback to GeneralUtility::makeInstance is no longer used – therefore it is dropped. Releases: master Resolves: #88800 Change-Id: I6dbec2f91fc78c1b06dd179323fb7a4810c13baa Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61322 Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Susanne Moog <look@susi.dev> Tested-by:
Daniel Goerz <daniel.goerz@posteo.de> Reviewed-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Daniel Goerz <daniel.goerz@posteo.de>
-
- Jul 13, 2019
-
-
Benni Mack authored
This patch re-arranges the TYPO3 Core internally used middlewares for lifting off the weight of $GLOBALS['TSFE'] as Site Handling already introduced a lot of functionality which can now be utilized further. For this reason, the Frontend Rendering chain has been adapted. * If there is a "Site" + "Language" resolved, this information can be used directly, as there are no dependencies currently. * Frontend + Backend User Authentication works regardless of TSFE, Frontend User is added to the Request object as attribute to be added to TSFE later-on. * Resolving the Page ("slug") and mapping them to Page Arguments (URL parts + GET parameters) as well as validation against cHash is fully decoupled from TSFE. After that, TSFE is instantiated, which now gets all resolved objects injected. TSFE now only resolves the rootline against the proper permissions (auth) and validates the final page. Once done, TypoScript is compiled / cached. TSFE still contains the rootline, TypoScript, and the information about which non-cacheables are there. RequestHandler creates or fetches cached content, but currently piped through TSFE. This should be simplified further later-on. Resolves: #88717 Releases: master Change-Id: I12807455fd8b01493b2da45cf73a5c532b108cbe Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155 Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
- Jun 05, 2019
-
-
Benni Mack authored
Due to non-site handling, setting the locale was built on top of TypoScript settings. This was the reason, this was encapsulated within "$TSFE->settingLocale()". However, as the locale is now always available once SiteLanguage has been resolved, this can be handled very early. On top, the functionaltiy can be extracted from TSFE completely, and be universally used within "Locales". The method $TSFE->settingLocale() is now deprecated. Resolves: #88473 Releases: master Change-Id: I28c057ecc6d6ba37153a09812a61e5827cdb7bc5 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60863 Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
- May 24, 2019
-
-
Benni Mack authored
The TypoScript option config.defaultGetVars is not evaluated anymore, as this conflicts with TypoScript logic itself: After TypoScript parsing and condition evaluation in a Frontend Request, config.defaultGetVars is set, this would effectively mean that TypoScript parsing should be re-done in order to meet new possible matches in Conditions. As this logic is flawed and should now easily be handled via a custom middleware (previously this was helpful for setting e.g. L=0 for default pages with RealURL), it is now removed from Core. Resolves: #88419 Releases: master Change-Id: Ic286c96f71953062d7649d71abb72f8f0f20f1a9 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60799 Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Susanne Moog <look@susi.dev>
-
- Feb 07, 2019
-
-
Benni Mack authored
All PSR-15 middlewares now do not set the $GLOBALS['TYPO3_REQUEST'] object anymore. Instead, the RequestHandlers are using them for all other logic (e.g. GP etc) where the request object or any other attribute has not been handed in yet. It is now safe to say that PSR-7 request/response objects have to be used within middlewares to access or manipulate GET/POST data. Also, the safety net for overriding GET/POST again is still in place for FE (data = GP:id) in order for existing TypoScript to work still, until all other code gets global-free. There are still places in TYPO3 Core where $TYPO3_REQUEST is necessary (TypoScriptConditionMatcher, Error Handling) which are added accordingly. Resolves: #87661 Releases: master Change-Id: Ibe499b6fda86ccd3abefcb3c8be294a7cb765d74 Reviewed-on: https://review.typo3.org/59490 Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
TYPO3com <noreply@typo3.com> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com>
-
- Dec 20, 2018
-
-
Benni Mack authored
The following code related to TSFE has been removed: PHP classes: * TYPO3\CMS\Core\PageTitle\AltPageTitleProvider * TYPO3\CMS\Frontend\Page\ExternalPageUrlHandler * TYPO3\CMS\Frontend\Page\PageGenerator * TYPO3\CMS\Frontend\Page\EidUtility PHP interfaces: * TYPO3\CMS\Frontend\Http\UrlHandlerInterface Methods that have been marked as protected * tempPageCacheContent() * realPageCacheContent() * setPageCacheContent() * clearPageCacheContent_pidList() * setSysLastChanged() * contentStrReplace() Dropped TSFE methods * mergingWithGetVars() * connectToDB() * initFEuser() * checkAlternativeIdMethods() * initializeBackendUser() * getPageShortcut() * pageUnavailableAndExit() * pageNotFoundAndExit() * checkPageUnavailableHandler() * pageUnavailableHandler() * pageNotFoundHandler() * pageErrorHandler() * makeCacheHash() * initTemplate() * handleDataSubmission() * initializeRedirectUrlHandlers() * redirectToExternalUrl() * checkPageForMountpointRedirect() * checkPageForShortcutRedirect() * redirectToCurrentPage() * processOutput() * sendCacheHeaders() * sendHttpHeadersDirectly() * storeSessionData() * previewInfo() * hook_eofe() * addTempContentHttpHeaders() * setCSS() * getUniqueId() * readLLfile() * getLLL() * initLLvars() * convPOSTCharset() * convertCharsetRecursivelyToUtf8() * domainNameMatchesCurrentRequest() * getDomainDataForPid() * getDomainNameForPid() Dropped TSFE properties * activeUrlHandlers * page_cache_reg1 * siteScript * loginUser * gr_list * beUserLogin * workspacePreview * ADMCMD_preview_BEUSER_uid * showHiddenPage * showHiddenRecords * debug * MP_defaults * sys_language_uid * sys_language_mode * sys_language_content * sys_language_contentOL * altPageTitle * lang TSFE Properties now marked as protected * loginAllowedInBranch * loginAllowedInBranch_mode * cacheTimeOutDefault * cacheContentFlag * cacheExpires * isClientCachable * no_cacheBeforePageGen * tempContent * pagesTSconfig * pageCacheTags * uniqueCounter * uniqueString * pageAccessFailureHistory TSFE Method Signature changes * calculateLinkVars now 1st parameter is required * preparePageContentGeneration now 1st parameter is required 4th Parameter of TSFE->__construct() now unused Removed TypoScript * config.typolinkCheckRootline * config.titleTagFunction * config.USERUID_substToken * config.USERNAME_substToken Hooks $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc'] Database fields: * index_phash.data_page_reg1 Resolves: #87235 Releases: master Change-Id: Id95bb0ccb30852fd115fb9da7754fa2e64374a41 Reviewed-on: https://review.typo3.org/59226 Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de>
-
- Dec 19, 2018
-
-
Benni Mack authored
The following hooks have been removed: - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preBeUser'] - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'] - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission'] - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest'] - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB'] - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo'] The class EidRequestHandler has been removed. eID targets cannot include a scriptpath anymore: - $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['my_eID'] = 'EXT:benni/Scripts/download.php'; Instead, they must contain a target (callable, class/method, function). The various hooks are still in place in deprecated methods within TSFE which will be removed in the next patch. Also, now hardly usable PSR-15 middlewares will be cleaned up separately as well. Resolves: #87220 Releases: master Change-Id: Ic54af83c97f2e6d2fba4346e382240d0fac6a2dc Reviewed-on: https://review.typo3.org/59217 Reviewed-by:
Benjamin Franzke <bfr@qbus.de> Tested-by:
Benjamin Franzke <bfr@qbus.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Tested-by:
Wouter Wolters <typo3@wouterwolters.nl>
-
- Sep 30, 2018
-
-
Benni Mack authored
PageArguments are fetched and added on top of PSR-7 request queryParams right after they are validated from the PageRouter. They are also re-populated after config.defaultGetVars has modified global state. But they do not need to be set to TSFE again within the the PageArgumentValidator middleware. Resolves: #86483 Releases: master Change-Id: I03df4223832845038d4207417cfcab7cbcc687dc Reviewed-on: https://review.typo3.org/58507 Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Susanne Moog <susanne.moog@typo3.org> Tested-by:
Susanne Moog <susanne.moog@typo3.org> Reviewed-by:
Frank Naegler <frank.naegler@typo3.org> Tested-by:
Frank Naegler <frank.naegler@typo3.org>
-
- Sep 29, 2018
-
-
Benni Mack authored
Page-based routing can now be configured within a site configuration to add so-called "route enhancers" which allow to add more placeholders to a route for a page. There are three Enhancers that TYPO3 now ships with: - SimpleEnhancer - PluginEnhancer - ExtbasePluginEnhancer It is also possible to add custom enhancers by third- party extensions. Each placeholder within an enhancer can receive a so-called "Aspect", usually used for mapping speaking values instead of IDs, or month-names in an archive link, and "modifiers" to modify a placeholder. The simple enhancer transfers a link parameter, previously maybe used to add a `&product=123`, which will now result into `/product/123` for a page. PluginEnhancer adds a namespace, common for simple plugins or Pi-Based plugins, and the ExtbasePluginEnhancer adds logic for multiple route variants to be added, depending on the controller/action combinations. Aspects are processors / modifiers / mappers to transfer a placeholder value back & forth to make each placeholder value more "speaking". TYPO3 Core ships with the following aspects: * LocaleModifier (for localized path segments) * StaticValueMapper (for path segments with a static list) * StaticRangeMapper (for pagination) * PersistedAliasMapper (for slug fields) * PersistedPatternMapper (for database records without slug fields) Routing now returns a so-called "PageArguments" object which is then used for evaluating site-based URL handling and the cHash calculation. It is highly discouraged to access _GET or _POST variables within any kind of code now, instead the PSR-7 request object should be used as much as possible. Releases: master Resolves: #86365 Change-Id: I77e001a5790f1ab3bce75695ef0e1615411e2bd9 Reviewed-on: https://review.typo3.org/58384 Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Susanne Moog <susanne.moog@typo3.org> Tested-by:
Susanne Moog <susanne.moog@typo3.org> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
Oliver Hader <oliver.hader@typo3.org>
-
- Sep 17, 2018
-
-
Benni Mack authored
With PSR-15 it is not necessary to use any custom hooks during the frontend request setup process anymore, as middlewares are flexible enough to manipulate anything people want to do. On top, various middlewares are also declared internal as the usages are not really necessary to be publically exposed. - typo3/cms-core/normalized-params-attribute - typo3/cms-backend/legacy-document-template - typo3/cms-backend/output-compression - typo3/cms-backend/response-headers - typo3/cms-frontend/timetracker - typo3/cms-frontend/preprocessing - typo3/cms-frontend/eid - typo3/cms-frontend/content-length-headers - typo3/cms-frontend/tsfe - typo3/cms-frontend/output-compression - typo3/cms-frontend/prepare-tsfe-rendering - typo3/cms-frontend/shortcut-and-mountpoint-redirect Resolves: #86279 Releases: master Change-Id: I14fbd7b026acdc84fb23ca43cd395de5b7b9c4b6 Reviewed-on: https://review.typo3.org/58253 Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Benjamin Franzke <bfr@qbus.de> Tested-by:
Benjamin Franzke <bfr@qbus.de> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
Benni Mack <benni@typo3.org>
-
- Sep 13, 2018
-
-
Benni Mack authored
The config.defaultGetVars is executed and $_GET is modified, but not the middleware where this method is called. In order to also modify the middleware's request object, the option config.defaultGetVars is also evaluted again in the PSR-15 middleware. Resolves: #86241 Related: #86046 Releases: master Change-Id: I2238d93b4974a40b2228c099cef7c8a04bd6cf74 Reviewed-on: https://review.typo3.org/58266 Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Daniel Sattler <sattler@b13.de> Tested-by:
Daniel Sattler <sattler@b13.de> Reviewed-by:
Daniel Goerz <daniel.goerz@posteo.de> Tested-by:
Daniel Goerz <daniel.goerz@posteo.de> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Tested-by:
Wouter Wolters <typo3@wouterwolters.nl>
-
- Jul 27, 2018
-
-
Benni Mack authored
The method only does one line of code, and is now instantiated if needed. Resolves: #85666 Releases: master Change-Id: Id5df0ecb3f887743ea1167829c9cca69aef501e4 Reviewed-on: https://review.typo3.org/57693 Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by:
Susanne Moog <susanne.moog@typo3.org> Tested-by:
Susanne Moog <susanne.moog@typo3.org> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
- May 31, 2018
-
-
Tymoteusz Motylewski authored
The concept for custom UrlHandlers, introduced in TYPO3 v7 for extracting JumpURL into a TER extension has been deprecated in favor of PSR-15. These could be registered via $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlHandlers'] The methods related to that functionality have been deprecated. - $TSFE->initializeRedirectUrlHandlers() - $TSFE->redirectToExternalUrl() However, the core-internal calls have been marked with a property to ensure that no deprecation warning is triggered, but the functionality can be kept. Resolves: #85124 Releases: master Change-Id: Ie49d7200618d2b8ffdd5394ea9c649c123719b07 Reviewed-on: https://review.typo3.org/57096 Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Helmut Hummel <typo3@helhum.io> Tested-by:
Helmut Hummel <typo3@helhum.io>
-
- May 11, 2018
-
-
Benni Mack authored
A lot of functionality has been migrated from TypoScriptFrontendController into middlewares - functionality that has now no direct influence in the so-called controller of the frontend (TSFE) anymore. The respective methods are never called anymore from TYPO3 Core, and extensions that bootstrap their own frontend should ensure that the respective Middlewares are boot up and called, e.g. via custom stacks or just by setting up the "frontend" middleware stack. The following methods are now deprecated: - connectToDB() - checkAlternativeIdMethods() - initializeBackendUser() - handleDataSubmission() - setCSS() - convPOSTCharset() Additionally, there are some methods in TSFE which have been marked as "internal" but had the PHP visibility "public", which were now migrated to "protected". - getPageAndRootline() - checkRootlineForIncludeSection() - setSysPageWhereClause() - checkAndSetAlias() - getHash() - getLockHash() - setUrlIdToken() Resolves: #84965 Releases: master Change-Id: Ia8e29268189179061c09a204bb7275d231fea0dc Reviewed-on: https://review.typo3.org/56916 Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Cristian Buja <cristian.buja@intera.it> Tested-by:
Cristian Buja <cristian.buja@intera.it> Reviewed-by:
Susanne Moog <susanne.moog@typo3.org> Tested-by:
Susanne Moog <susanne.moog@typo3.org>
-
- May 10, 2018
-
-
Benni Mack authored
For historical purposes, TimeTracker->push() is called with an empty string in the second parameter, however, as this parameter is optional and set to '' by default as well, the code readability can be improved by just using the first parameter when using TimeTracker->push() Resolves: #84964 Releases: master Change-Id: I37a338268f9b2df9f2a98414075d207b63dc542e Reviewed-on: https://review.typo3.org/56913 Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Tested-by:
Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Tested-by:
Markus Klein <markus.klein@typo3.org>
-
- May 09, 2018
-
-
Helmut Hummel authored
The additional isINTincScript check stems from the time where this code was in a separate file, which was included two times and page generation should be skipped for the second inclusion. As INT scripts are only generated during page rendering (or when fetching the page from cache) we can safely remove this condition now. Additionally, we can now easily get rid of the elseif and move the page rendering preparation directly after the same condition is checked later in the code flow. This is fine, because this code does not need to be executed before the lock is released. Last but not least we clean up admin panel messages to clearly distinguish between page generation and rendering preparation. As this is a pure non breaking cleanup, this can safely go into 8.7 branch as well. Resolves: #84945 Releases: master, 8.7 Change-Id: If12b82a549d4cc47619c46f73c5423df70621b1b Reviewed-on: https://review.typo3.org/56884 Reviewed-by:
Daniel Goerz <ervaude@gmail.com> Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Frank Naegler <frank.naegler@typo3.org> Tested-by:
Frank Naegler <frank.naegler@typo3.org> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Tested-by:
Markus Klein <markus.klein@typo3.org>
-
- May 04, 2018
-
-
Helmut Hummel authored
In the course of making TSFE request/response aware, we split the rendering preparations of TSFE into a PSR-15 middleware. This the first step to extract other parts, like redirecting to shortcuts/ mountpoints and sending http headers as well into middleware implementations. Resolves: #84909 Releases: master Change-Id: I704ae89a23c8e254574e19a78ecec363f182c747 Reviewed-on: https://review.typo3.org/56833 Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Frank Naegler <frank.naegler@typo3.org> Tested-by:
Frank Naegler <frank.naegler@typo3.org>
-