Project

General

Profile

Actions

Bug #89400

closed

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

Added by Kurt Kunig over 4 years ago. Updated over 4 years ago.

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

0%

Estimated time:
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


Files

2019-10-11_155922_cat-list.jpg (68.6 KB) 2019-10-11_155922_cat-list.jpg Backend list view of categories Kurt Kunig, 2019-10-11 16:18
2019-10-11_155800_#1534710048.jpg (181 KB) 2019-10-11_155800_#1534710048.jpg the upcoming error message Kurt Kunig, 2019-10-11 16:18
2019-10-28_131057.jpg (115 KB) 2019-10-28_131057.jpg Kurt Kunig, 2019-10-28 13:11
Actions #1

Updated by Christoph Hendreich over 4 years 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
Actions #2

Updated by Christoph Hendreich over 4 years ago

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

Actions #3

Updated by Kurt Kunig over 4 years ago

YESSSSSSSSSSSSSSS!

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

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

So, tx_news is the culprit!

Actions #4

Updated by Christoph Hendreich over 4 years 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
);

Actions #5

Updated by Christoph Hendreich over 4 years ago

  • Tags changed from sys_category, pseudo-site to sys_category, pseudo-site, news
Actions #6

Updated by Benni Mack over 4 years ago

  • Status changed from New to Closed

Hey everybody,

As this is an issue with EXT:news, I suggest to open a bug issue there - I will close this one. If there is a need to fix this in TYPO3 Core, let me know and I will re-open the ticket again.

Actions

Also available in: Atom PDF