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

Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65324

Actions #2

Updated by Benni Mack over 4 years ago

Hey Michael,

thanks for the detailed issue report, this helps so much! Feel free to test my proposed change https://review.typo3.org/c/Packages/TYPO3.CMS/+/65324
and vote for it on Gerrit, so we can fix it easily.

If you have any more questions regarding workspaces, reach out to me via slack or email (), as we're looking into use cases of people using workspaces with v10 and beyond.

Actions #3

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65309

Actions #4

Updated by Benni Mack over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF