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.
Category:
Backend User Interface
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
Files
- Status changed from New to Under Review
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
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.
@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 :)
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 :)
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
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
This behaviour was introduced with #81430
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF