Bug #92002
closedWorkspaces Notification Email always contains first workspace with UID 1
100%
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
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
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 (benni@typo3.org), as we're looking into use cases of people using workspaces with v10 and beyond.
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
Updated by Benni Mack over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ebf9ff75744e41890c386ba7eba92170b216700b.