-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUGFIX] Ender preview translated flag information in TYPO3 v12 (5.x) #398
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sbuerk
changed the title
[BUGFIX] Ender preview translated flag information in TYPO3 v12
[BUGFIX] Ender preview translated flag information in TYPO3 v12 (5.x)
Dec 14, 2024
TYPO3 v12 removed the `contentPostProc-all` aling with other hooks in favour of new PSR-14 `AfterCacheableContentIsGeneratedEvent`. The `DeeplPreviewFlagGeneratePageHook` is not called in TYPO3 v12 anymore and the translated preview flag is not displayed. Changed behavour between TYPO3 v11 and v12 was not intented and simply an oversight to mitigate when adding TYPO3 v12 support. Sadly, this has not been detected for quite a while now. This change introduces a event listener for the TYPO3 v12 event, rendering the same flag to restore the missing and wanted preview flag while keeping the hook implementation for TYPO3 v11 instances. Choosen strategy follows the recommended way to migrate from the hook to the event when dual TYPO3 version support is required. Used command(s): ```base Build/Scripts/runTests.sh -t 12 -p 8.1 -s composerUpdate Build/Scripts/runTests.sh -t 12 -p 8.1 -s phpstanGenerateBaseline ``` [1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-97862-HooksRelatedToGeneratingPageContentRemoved.html [2] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-97862-NewPSR-14EventsForManipulatingFrontendPageGenerationAndCacheBehaviour.html
sbuerk
force-pushed
the
issue-395-upport
branch
from
December 14, 2024 21:34
8193ccc
to
f1f9b8b
Compare
sbuerk
added a commit
that referenced
this pull request
Dec 14, 2024
Since TYPO3 v12 `contentPostProc-all` hook is not called and replaced with PSR-14 event `AfterCacheableContentIsGeneratedEvent`, which has been respected with * #397 * #398 TYPO3 v11 support has been removed and this change cleansup introduced dual version code with upporting the bugfix as a housekeeping change. Further, the now obsolete hook is completly removed. Related: #397 Related: #398
sbuerk
added a commit
that referenced
this pull request
Dec 14, 2024
Since TYPO3 v12 `contentPostProc-all` hook is not called and replaced with PSR-14 event `AfterCacheableContentIsGeneratedEvent`, which has been respected with * #397 * #398 TYPO3 v11 support has been removed and this change cleansup introduced dual version code with upporting the bugfix as a housekeeping change. Further, the now obsolete hook is completly removed. Related: #397 Related: #398
sbuerk
added a commit
that referenced
this pull request
Dec 14, 2024
Issue #395 has been recently fixed for 4.x and 5.x with following pull-requests: * #397 * #398 Adding regression test has been omited due to issues within the `typo3/testing-framework` already. The major missing part boils down to an incomplete frontend backend user authentication setup, reported by Daniel Siepmann [1] and provided a pull-request [2]. * [1] Issue: TYPO3/testing-framework#535 * [2] Pull-request: TYPO3/testing-framework#536 The pull-request has been adopted by providing a test-fixture extension replacing the BackendUserHandler with a fixed version. Sadly, this required an additional temporary workaround within the functional test bootstrap, enforce loading package infor for the testing-framework extensions. That needs to be fixed within `typo3/testing-framework`, enforce loading the package info in Testbase->linkFrameworkExtensionsToInstance` when linking the framework extension - or refactor the linking all together. For ongoing work to add TYPO3 v13 support we take the workarounds to continue the work having regression test in place and do not wait until resolved in the testing-framework which needs adoptions in the TYPO3 monorepo and therefore some coordination in fix, release and upgrade. SiteBasedTestTrait related reporting for new test case are added to the baseline for now, needs to be addressed in general with a dedcated change. Used command(s): ```bash Build/Scripts/runTests.sh -t 12 -p 8.1 -s phpstanGenerateBaseline ``` Related: #395 Related: #398 Related: #397
sbuerk
added a commit
that referenced
this pull request
Dec 14, 2024
Issue #395 has been recently fixed for 4.x and 5.x with following pull-requests: * #397 * #398 Adding regression test has been omited due to issues within the `typo3/testing-framework` already. The major missing part boils down to an incomplete frontend backend user authentication setup, reported by Daniel Siepmann [1] and provided a pull-request [2]. * [1] Issue: TYPO3/testing-framework#535 * [2] Pull-request: TYPO3/testing-framework#536 The pull-request has been adopted by providing a test-fixture extension replacing the BackendUserHandler with a fixed version. Sadly, this required an additional temporary workaround within the functional test bootstrap, enforce loading package infor for the testing-framework extensions. That needs to be fixed within `typo3/testing-framework`, enforce loading the package info in Testbase->linkFrameworkExtensionsToInstance` when linking the framework extension - or refactor the linking all together. For ongoing work to add TYPO3 v13 support we take the workarounds to continue the work having regression test in place and do not wait until resolved in the testing-framework which needs adoptions in the TYPO3 monorepo and therefore some coordination in fix, release and upgrade. SiteBasedTestTrait related reporting for new test case are added to the baseline for now, needs to be addressed in general with a dedcated change. Used command(s): ```bash Build/Scripts/runTests.sh -t 12 -p 8.1 -s phpstanGenerateBaseline ``` Related: #395 Related: #398 Related: #397
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TYPO3 v12 removed the
contentPostProc-all
aling with other hooksin favour of new PSR-14
AfterCacheableContentIsGeneratedEvent
.The
DeeplPreviewFlagGeneratePageHook
is not called in TYPO3 v12anymore and the translated preview flag is not displayed. Changed
behavour between TYPO3 v11 and v12 was not intented and simply an
oversight to mitigate when adding TYPO3 v12 support. Sadly, this
has not been detected for quite a while now.
This change introduces a event listener for the TYPO3 v12 event,
rendering the same flag to restore the missing and wanted preview
flag while keeping the hook implementation for TYPO3 v11 instances.
Choosen strategy follows the recommended way to migrate from the
hook to the event when dual TYPO3 version support is required.
Used command(s):
[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-97862-HooksRelatedToGeneratingPageContentRemoved.html
[2] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-97862-NewPSR-14EventsForManipulatingFrontendPageGenerationAndCacheBehaviour.html
TYPO3 v12 with this change
Resolves: #395