Repository navigation
[BUGFIX] Do not end up in workspace and preview for default requests - #536
DanielSiepmann wants to merge 1 commit into
Conversation
|
Should this only go into the |
|
I'm fine with both. I personally need this in one project where we apply this as a patch. |
|
If I run full core functional testsuite (with your original change and also my adoption) i get 4 failures: so I guess we need more investigation there first. Will have a more detailed look later. |
Default requests won't have a workspace id. That will lead to TYPO3 defaults -99 id. That in turn will lead to being in preview mode once a backend user is provided within context. We therefore cover the default and turn it into live workspace which could be the expected default. Also we add missing initialization for backend user. Resolves: TYPO3#535
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
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
|
The four failures from #536 (comment) still reproduce on current core main with this PR applied: The cause is in those core tests, not in this PR: after publishing, "Regular Element #2" is hidden in live, but the tests expect it to be rendered. That only worked because the backend user stayed in workspace -99, which the frontend treats as an offline workspace. The sibling Core change that fixes the tests: https://review.typo3.org/c/Packages/TYPO3.CMS/+/97668 (Forge https://forge.typo3.org/issues/111459). It requests the live workspace explicitly and expects the hidden element not to be rendered. The adjusted tests pass with testing-framework main and with this PR, so the core change can be merged first and this PR afterwards. |
Default requests won't have a workspace id.
That will lead to TYPO3 defaults -99 id.
That in turn will lead to being in preview mode once a backend user is provided within context.
We therefore cover the default and turn it into live workspace which could be the expected default.
Resolves: #535