Actions
Bug #92002
closedWorkspaces Notification Email always contains first workspace with UID 1
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2020-08-14
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Prerequisites:¶
- TYPO3 set up with multiple workspaces configured
- at least one workspace has other uid than "1"
Steps to reproduce the problem¶
- editor creates/updates content in his workspace (which is not uid 1)
- editor switches to "workspaces" module and switches state for edited content, so notification email is sent
Actual results¶
- notification email always contains title of workspace with uid=1, e.g. "XX items sent to stage "Bereit zum Veröffentlichen" in workspace "[TITLE OF WORKSPACE 1]"
Expected results¶
- actual workspace is set in notification email, e.g. leading to "XX items sent to stage "Bereit zum Veröffentlichen" in workspace "[TITLE OF CORRECT WORKSPACE]"
Additional notes¶
- seems like wrong data is given over in typo3_src/typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php, line 175
$workspaceRec = BackendUtility::getRecord('sys_workspace', $groupedNotificationInformation['shared'][0]);
- second parameter is an array of the actual workspace, but
BackendUtility::getRecord($table, $uid)
expects $uid to be int - inside function
getRecord
the param $uid is casted to int - since here an array is given, the cast always returns 1 and the workspace with uid 1 is selected for notification email
Actions