Slug field type in TCA causes error, when the record uid does not match a page uid
The TCA field type=slug in a record requires that a valid page with the same uid is in the database.
This appears in any custom record. For easy showcase this can be reproduced with the news extension.
How to reproduce the error:
1. Install for example news, so the sys_category record is extended by a TCA field type=slug
2. Create a page with for example uid 3.000
3. Create a sys_category record with uid 3.000 (have to match the page uid!)
4. Press "+ New".
5. = Record is saved. No error.
6. Delete Page with uid 3.000. (from database, or by setting deleted=1)
7. Open sys_category record with uid 3.000 and press "+ New"
8. = Error: No pseudo-site found in root line of page 3000
#2 Updated by Florian Schöppe 2 months ago
I can reproduce the error with TYPO3 9.5.20 and tt_address 5.1.2:
If I click the New-Button in the detail view of an existing record or the Plus-Button of an existing record in the list view the following error message is shown:
(1/1) #1534710048 TYPO3\CMS\Core\Exception\SiteNotFoundException No pseudo-site found in root line of page 5709 in /typo3_src-9.5.20/typo3/sysext/core/Classes/Site/PseudoSiteFinder.php line 189
I only have a vague understanding of what is happening in the code, but for me it looks like the vanillaUid passed when a (tt_address) record is created after an existing record is misinterpreted as a page uid in the PseudoSiteTcaDisplayCondition class around line 67-74. The comment there suggests that every record is considered a page record (and not a tt_address record in my case)!?
#3 Updated by Georg Ringer 24 days ago
- Status changed from New to Rejected
those have been errors in the extensions tt_address and news and both are fixed in the meantime. the displayCondition for the slug field was never meant to be used within records other than pages. therefore I am closing this issue