Project

General

Profile

Actions

Bug #86453

closed

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

Added by Ioulia Kondratovitch about 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2018-09-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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


Files

01_actual_result.png (468 KB) 01_actual_result.png Ioulia Kondratovitch, 2018-09-29 20:25
02_expected_result.png (199 KB) 02_expected_result.png Ioulia Kondratovitch, 2018-09-29 20:25
00_steps_before.png (229 KB) 00_steps_before.png Ioulia Kondratovitch, 2018-09-29 21:18
cattura.png (47.2 KB) cattura.png Riccardo De Contardi, 2018-09-30 23:42
forge-86453-1.png (45.1 KB) forge-86453-1.png Ioulia Kondratovitch, 2018-10-02 10:47
forge-86453-2.png (280 KB) forge-86453-2.png Ioulia Kondratovitch, 2018-10-02 10:47
Actions #1

Updated by Gerrit Code Review about 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58472

Actions #3

Updated by Gerrit Code Review about 6 years ago

Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58472

Actions #4

Updated by Riccardo De Contardi about 6 years ago

I tried the following test with TYPO3 9.5-dev (master)

1) create a page (name: tessssss)
2) click on it and create on it an ext typoscript template (name: +ext tessssss)
3) go on database and delete manually the page tessssss
4) click on root page (id=0) and on template module

Results

The "+ext tessssss" template is listed on a page without title and id

If you try to click on it, it leads to an exception

(1/1) #1534710048 TYPO3\CMS\Core\Exception\SiteNotFoundException
No pseudo-site found in root line of page 841
Actions #5

Updated by Josef Glatz about 6 years ago

Riccardo De Contardi wrote:

I tried the following test with TYPO3 9.5-dev (master)

1) create a page (name: tessssss)
2) click on it and create on it an ext typoscript template (name: +ext tessssss)
3) go on database and delete manually the page tessssss
4) click on root page (id=0) and on template module

Results

The "+ext tessssss" template is listed on a page without title and id

If you try to click on it, it leads to an exception

[...]

I could not reproduce the error within TYPO3 master (9.5.0-dev). Incidentally, the version is also set to TYPO3 v8 in the ticket.

Actions #6

Updated by Riccardo De Contardi about 6 years ago

@Josef Glatz I think you're right.

I just wanted to report the exception you get on version 9.5 if you try to perform the same operations (at least what I have understood). I guess it cannot be avoided :)

Actions #7

Updated by Ioulia Kondratovitch about 6 years ago

Riccardo, you got the steps right.
I didn't check the situation in TYPO3 9, but I agree, it might need a fallback (patch)

Riccardo De Contardi wrote:

@Josef Glatz I think you're right.

I just wanted to report the exception you get on version 9.5 if you try to perform the same operations (at least what I have understood). I guess it cannot be avoided :)

Actions #8

Updated by Josef Glatz about 6 years ago

Ioulia Kondratovitch wrote:

Riccardo, you got the steps right.
I didn't check the situation in TYPO3 9, but I agree, it might need a fallback (patch)

Riccardo De Contardi wrote:

@Josef Glatz I think you're right.

I just wanted to report the exception you get on version 9.5 if you try to perform the same operations (at least what I have understood). I guess it cannot be avoided :)

Can you reproduce the error in TYPO3 master? If yes, please describe how I can reproduce it. Many thanks

Actions #9

Updated by Gerrit Code Review about 6 years ago

Patch set 3 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58472

Updated by Ioulia Kondratovitch about 6 years ago

I cannot reproduce the error (originally reported by me in this ticket) in master.
I went over the steps described by Ricardo.
I can reproduce the problem described by Ricardo in master. Follow Steps 1-4 =>

(1/1) #1534710048 TYPO3\CMS\Core\Exception\SiteNotFoundException

No pseudo-site found in root line of page 20
in /app/web/typo3/sysext/core/Classes/Site/PseudoSiteFinder.php line 178

            if (isset($this->pseudoSites[(int)$pageInRootLine['uid']])) {
                return $this->pseudoSites[(int)$pageInRootLine['uid']];
            }
        }
        throw new SiteNotFoundException('No pseudo-site found in root line of page ' . $pageId, 1534710048);
    }

    /**
     * Find a site by given root page id

The problem is, we try to fetch a page without ID (screenshot)
This should be a new ticket, I think.

Josef Glatz wrote:

Ioulia Kondratovitch wrote:

Riccardo, you got the steps right.
I didn't check the situation in TYPO3 9, but I agree, it might need a fallback (patch)

Riccardo De Contardi wrote:

@Josef Glatz I think you're right.

I just wanted to report the exception you get on version 9.5 if you try to perform the same operations (at least what I have understood). I guess it cannot be avoided :)

Can you reproduce the error in TYPO3 master? If yes, please describe how I can reproduce it. Many thanks

Actions #11

Updated by Joerg Kummer about 6 years ago

This behaviour was introduced with #81430

Actions #12

Updated by Gerrit Code Review almost 6 years ago

Patch set 4 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58472

Actions #13

Updated by Ioulia Kondratovitch almost 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #14

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF