Issue Bug Closed

#86453Exception thrown in BE -> Template (PID 0) . TYPO3 8.7.19

Ioulia Kondratovitch 09/29/18, 20:30 updated 05/07/19, 12:17

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:

  1. BE -> Template: add new page.
  2. BE -> Template: create TS-Template for the new page
  3. DB -> delete the entry for the just created page directly in the database, table “pages” (keep the reffering entry in the table “sys_template”!)
  4. 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

Reviews 1