testing-framework icon indicating copy to clipboard operation
testing-framework copied to clipboard

[BUGFIX] Do not end up in workspace and preview for default requests

Open DanielSiepmann opened this issue 1 year ago • 3 comments

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

DanielSiepmann avatar Jan 25 '24 10:01 DanielSiepmann

Should this only go into the main branch, or would it make sense to backport it to 7.x as well?

oliverklee avatar Feb 14 '24 12:02 oliverklee

I'm fine with both. I personally need this in one project where we apply this as a patch. I'd leave this up to the maintainer to decide.

DanielSiepmann avatar Feb 14 '24 12:02 DanielSiepmann

If I run full core functional testsuite (with your original change and also my adoption) i get 4 failures:

$ Build/Scripts/runTests.sh -s functional

1) TYPO3\CMS\Core\Tests\Functional\DataScenarios\Regular\WorkspacesPublish\ActionTest::hideContent
Failed asserting that response has records.
* Section "Default": Could not assert all values for "tt_content.header": Regular Element #2

/var/www/work/t3c/core-main/core-main/typo3/sysext/core/Tests/Functional/DataScenarios/Regular/WorkspacesPublish/ActionTest.php:105

2) TYPO3\CMS\Core\Tests\Functional\DataScenarios\Regular\WorkspacesPublish\ActionTest::hideContentAndMoveToDifferentPage
Failed asserting that response has records.
* Section "Default": Could not assert all values for "tt_content.header": Regular Element #2

/var/www/work/t3c/core-main/core-main/typo3/sysext/core/Tests/Functional/DataScenarios/Regular/WorkspacesPublish/ActionTest.php:133

3) TYPO3\CMS\Core\Tests\Functional\DataScenarios\Regular\WorkspacesPublishAll\ActionTest::hideContent
Failed asserting that response has records.
* Section "Default": Could not assert all values for "tt_content.header": Regular Element #2

/var/www/work/t3c/core-main/core-main/typo3/sysext/core/Tests/Functional/DataScenarios/Regular/WorkspacesPublishAll/ActionTest.php:100

4) TYPO3\CMS\Core\Tests\Functional\DataScenarios\Regular\WorkspacesPublishAll\ActionTest::hideContentAndMoveToDifferentPage
Failed asserting that response has records.
* Section "Default": Could not assert all values for "tt_content.header": Regular Element #2

/var/www/work/t3c/core-main/core-main/typo3/sysext/core/Tests/Functional/DataScenarios/Regular/WorkspacesPublishAll/ActionTest.php:128

so I guess we need more investigation there first. Will have a more detailed look later.

sbuerk avatar Feb 21 '24 11:02 sbuerk