#86453Exception thrown in BE -> Template (PID 0) . TYPO3 8.7.19
Description
Environment:
TYPO3 Version : 8.7.19
*Webserver* : Apache/2.4.10 (Debian)
*PHP Version* : 7.1.14
*Database* (Default) : MySQL 5.6.39
*Application Context* : Development/Docker
*Composer mode* : Enabled
*Operating System* : Linux 4.9.93-linuxkit-aufs
*Third-party extensions*: no
Problem:
BE -> Template -> PID 0 throws an exception, if the page reffered by sys_template entry doesn’t exist in the database
This issue occures since in TYPO3 8.7.19
Steps to reproduce:
- BE -> Template: add new page.
- BE -> Template: create TS-Template for the new page
- DB -> delete the entry for the just created page directly in the database, table “pages” (keep the reffering entry in the table “sys_template”!)
- BE -> Template -> PID 0
Result:
Expected result: List of Templates
*Actual Result*: Exception
Uncaught TYPO3 Exception
Argument 2 passed to TYPO3\CMS\Core\Imaging\IconFactory::getIconForRecord() must be of the type array, null given, called in /app/vendor/typo3/cms/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php on line 602
TypeError thrown in file
/app/vendor/typo3/cms/typo3/sysext/core/Classes/Imaging/IconFactory.php in line 137.
Comment:
This issue can easily happen at some very old TYPO3-websites with a long history