Steps to reproduce
1. Create a workspace.
2. Create a new translation of a page within a workspace.
3. Change to live workspace.
4. Try to access the page where the new translation has been added in the page module.
Page can not be loaded in the page module. Responds with an error message.
"Uncaught TYPO3 Exception: Argument 2 passed to TYPO3\CMS\Core\Imaging\IconFactory::getIconForRecord() must be of the type array, boolean given"
Please find a patch solving the problem attached.
#8 Updated by Riccardo De Contardi 11 months ago
some info maybe also on #82535; I copy here part of the issue description:
Debugged a little and the problems seems to be that he tries to fetch the WorkspaceStaging Record within this query:$lpRecord = $queryBuilder->select('*') ->from('pages_language_overlay') ->where( $queryBuilder->expr()->eq( 'pid', $queryBuilder->createNamedParameter($id, \PDO::PARAM_INT) ), $queryBuilder->expr()->eq( 'sys_language_uid', $queryBuilder->createNamedParameter($lP, \PDO::PARAM_INT) ) ) ->setMaxResults(1) ->execute() ->fetch();
pid is set to the ID of the originial Page but he tries to fetch the page_language_overlay record from the workspace with the pid -1. So $lpRecord is not a $row but a boolea with the value "false" causing the error.