Bug #93273
closedCustom PageTs not loaded if a content object is deleted ina workspace
100%
Description
When editing a content element or page in a workspace and approving it, an email is sent to a list of recipients. When this happens, the function TYPO3\CMS\Workspaces\Notification\StateChangeNotification:notifyStateChange retrieves the element record, page uid and email configuration (pageTSConfig).
As long as the element was changed and not deleted everything works perfectly, but if the element was deleted, the retrieved element in the following line (77) is an empty array:
_ $elementRecord = (array)BackendUtility::getRecord($elementTable, $elementUid);_
If the retrieved element record is an empty array, the page uid is always 0 and the custom pageTsConfig is not found.
I think that the problem lies in the BackendUtility::getRecord function and the parameter $useDeleteClause.
Behaviour for end user:
ACTUAL:
Default Workspaces Email is sent after approval
EXPECTED:
Custom Email should be sent after approval(defined in custom pageTsConfig)
Files