Project

General

Profile

Actions

Bug #92002

closed

Workspaces Notification Email always contains first workspace with UID 1

Added by Michael Huber over 4 years ago. Updated about 4 years ago.

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:

  1. TYPO3 set up with multiple workspaces configured
  2. at least one workspace has other uid than "1"

Steps to reproduce the problem

  1. editor creates/updates content in his workspace (which is not uid 1)
  2. editor switches to "workspaces" module and switches state for edited content, so notification email is sent

Actual results

  1. 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

  1. 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

  1. 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]);
  2. second parameter is an array of the actual workspace, but BackendUtility::getRecord($table, $uid) expects $uid to be int
  3. 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

Also available in: Atom PDF