Bug #82626
closedProblem with users without access to LIVE workspace
0%
Description
Steps to reproduce the issue:
- Install fresh 8.7 TYPO3
- Add Introduction Package to have some content
- Activate workspaces extension
- Add a user group without access to LIVE workspace
- Add a user to newly created user group that also has no access to LIVE workspace
- Create a new workspace e.g. named 'Draft'
- make user group member of the workspace
- login as the new user
You get the error message "Oops, an error occurred! No such workspace defined".
This also affects the frontend, blocking the site all the way.
Workaround for now is to edit the be_users database table and set the correct id of the 'Draft' workspace for the user(s).
However, the problem did not occur in TYPO3 7.6 or earlier.
Files
Updated by Thomas Prangenberg about 7 years ago
I can confirm this issue in TYPO3 8.7.7
This also affects users who have previously had access to the LIVE workspace but have been updated or moved to another group.
So, another way to reproduce:
1. edit an existing user with acces to live workspace
2. remove the group that grants access to live workspace, add a group that is a member of a non-LIVE workspace "draft"
3. try to switch user or log in as the user - the expected behaviour wolud be that the user is now in "draft" instad of LIVE
4. the record in be_users will be updated with workspace=-99, you will be stuck with the following exception until ending the session.
#1476045469: No such workspace defined InvalidArgumentException thrown in file /var/www/vendor/typo3/cms/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php in line 129. TYPO3\CMS\Workspaces\Service\WorkspaceService::getWorkspaceTitle(-99) ...
The only way to fix this is by manually editing each affected be_users record in the database, which is impossible to maintain on a large scale.
Updated by Thomas Prangenberg about 7 years ago
The problem seems to be that only the "reviewers" column of a workspace is checked but not "members" when fetching the default workspace.
The attached patch for TYPO_8-7 solved it for me.
regards
Thomas
Updated by Riccardo De Contardi about 7 years ago
- Related to Bug #80901: Missing workspace causes exception when "Edit Live" flag is cleared in user settings added
Updated by Riccardo De Contardi almost 7 years ago
Hello @Matthias Schleiff thank you for your findings and your patch. Could you maybe push the patch to Gerrit, our review system? Thank you!
Here you can find the instructions: https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/ Thanks again in advance!
Updated by Tymoteusz Motylewski almost 7 years ago
- Status changed from New to Closed
I'm closing it as a duplicate of https://forge.typo3.org/issues/80901 . The other issue contains a patch in gerrit, so the discussion and work should continue there.