Bug #89400

#1534710048 TYPO3\CMS\Core\Exception\SiteNotFoundException after add a new category

Added by Kurt Kunig 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2019-10-11
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
sys_category, pseudo-site, news
Complexity:
Is Regression:
Sprint Focus:

Description

I get this error, when I want to insert / add a new category with the "+" icon in the extended view of a category-list:
The mentioned "page" 2 is not a page-id but the cat-id!?

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1534710048: No pseudo-site found in root line of page 2 | TYPO3\CMS\Core\Exception\SiteNotFoundException thrown in file /html/typo3/typo3_src-9.5.9/typo3/sysext/core/Classes/Site/PseudoSiteFinder.php in line 189. Requested URL: http://p528366.webspaceconfig.de/typo3/index.php?route=%%2Frecord%%2Fedit&token=--AnonymizedToken--&edit[sys_category][-2]=new&returnUrl=%%2Ftypo3%%2Findex.php%%3Froute%%3D%%252Fweb%%252Flist%%252F%%26token%%3D264c04dfe60cc385c744f915b0bb6a614cc767c8%%26id%%3D1248%%26table%%3D%%26imagemode%%3D1

Please look into the screenshots below

2019-10-11_155922_cat-list.jpg View - Backend list view of categories (68.6 KB) Kurt Kunig, 2019-10-11 16:18

2019-10-11_155800_#1534710048.jpg View - the upcoming error message (181 KB) Kurt Kunig, 2019-10-11 16:18

2019-10-28_131057.jpg View (115 KB) Kurt Kunig, 2019-10-28 13:11

History

#1 Updated by Christoph Hendreich about 2 months ago

  • Target version set to next-patchlevel
  • Tags changed from category to sys_category, pseudo-site

I can confirm this error as well in typo3 version 9.5.10

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1534710048: No pseudo-site found in root line of page 23 | 
TYPO3\CMS\Core\Exception\SiteNotFoundException thrown in file /opt/typo3_src/typo3/sysext/core/Classes/Site/PseudoSiteFinder.php in line 189. 
Requested URL: https://dev.domain.com/typo3/index.php?route=%%2Frecord%%2Fedit&token=--AnonymizedToken--&edit[sys_category][-23]=new&returnUrl=%%2Ftypo3%%2Findex.php%%3Froute%%3D%%252Fweb%%252Flist%%252F%%26token%%3Dd8e67e851738c80d0c75dc14eb0d9a08cc03aae5%%26id%%3D19%%26table%%3Dsys_category%%26imagemode%%3D1%%26pointer%%3D60

#2 Updated by Christoph Hendreich about 2 months ago

@Kurt Kunig: Short question, are other extensions like news installed?

#3 Updated by Kurt Kunig about 2 months ago

YESSSSSSSSSSSSSSS!

I uninstalled the "news"-extension => no error

I installed the "news"-extension again => error !!!

So, tx_news is the culprit!

#4 Updated by Christoph Hendreich about 2 months ago

The error is probably in the following line:
'displayCond' => 'USER:' . \TYPO3\CMS\Core\Compatibility\PseudoSiteTcaDisplayCondition::class . '->isInPseudoSite:pages:false',
in ext/news/Configuration/TCA/Overrides/sys_category.php

if (version_compare(TYPO3_branch, '9.5', '>=')) {
    $newSysCategoryColumns['slug'] = [
        'exclude' => true,
        'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:pages.slug',
        //'displayCond' => 'USER:' . \TYPO3\CMS\Core\Compatibility\PseudoSiteTcaDisplayCondition::class . '->isInPseudoSite:pages:false',
        'config' => [
            'type' => 'slug',
            'size' => 50,
            'generatorOptions' => [
                'fields' => ['title'],
                'replacements' => [
                    '/' => '-'
                ],
            ],
            'fallbackCharacter' => '-',
            'eval' => 'uniqueInSite',
            'default' => ''
        ]
    ];
}

The best solution would be to create an overwrite for the TCA in its own extension:

YOUR EXT:/Configuration/TCA/Overrides/sys_category.php

<?php
defined('TYPO3_MODE') || die();

$tmp_columns = [

    'slug' => [
        'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:pages.slug',
        'exclude' => 1,
        'config' => [
            'type' => 'slug',
            'generatorOptions' => [
                'fields' => ['title'],
                'fieldSeparator' => '/',
                'prefixParentPageSlug' => false,
                'replacements' => [
                    '/' => '-',
                ],
            ],
            'fallbackCharacter' => '-',
            'eval' => 'uniqueInSite',
        ],
    ],

];

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
    'sys_category',
    $tmp_columns
);

#5 Updated by Christoph Hendreich about 2 months ago

  • Tags changed from sys_category, pseudo-site to sys_category, pseudo-site, news

Also available in: Atom PDF