Issue Bug Closed

#82535Non published Translation in Workspace causes Exception in Live Workspace

Anonymous 09/21/17, 16:49 updated 01/19/18, 23:22

Description

Scenario:
Workspace Live
Workspace Staging

User translates a Page in the Staging Workspace from the default langauge to another one.
Accessing the Page with another User in the Live-Workspace causes an Exception:

Argument 2 passed to TYPO3\CMS\Core\Imaging\IconFactory::getIconForRecord() must be of the type array, boolean given, called in /var/www/cores/typo3_src-8.7.7/typo3/sysext/backend/Classes/View/PageLayoutView.php on line 879

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.

This error only occurs if I select the language View in the Page Module for this specific page.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.