Project

General

Profile

Actions

Bug #82626

closed

Problem with users without access to LIVE workspace

Added by Matthias Schleiff about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2017-10-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

issue_82626_no-such-workspace.diff (1.11 KB) issue_82626_no-such-workspace.diff Thomas Prangenberg, 2017-11-21 10:54

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #80901: Missing workspace causes exception when "Edit Live" flag is cleared in user settingsClosed2017-04-20

Actions
Actions #1

Updated by Mona Muzaffar about 7 years ago

  • Category set to Workspaces
Actions #2

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.

Actions #3

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

Actions #4

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
Actions #5

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!

Actions #6

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.

Actions

Also available in: Atom PDF