Issue Bug Closed

#92002Workspaces Notification Email always contains first workspace with UID 1

Michael Huber 08/14/20, 09:56 updated 09/29/20, 15:06

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

Reviews 2