Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't edit/add new Catgories TYPO3 9.5.21 "No pseudo-site found in root line of page" #1344

Closed
ShortSnow opened this issue Sep 23, 2020 · 5 comments

Comments

@ShortSnow
Copy link

Hello,

"The problem is the usage of the \TYPO3\CMS\Core\Compatibility\PseudoSiteTcaDisplayCondition::isInPseudoSite() for the slug fields introduced ext:news"

more and detailed explanation: https://forge.typo3.org/issues/92331#change-431685

THX a lot

@martin-git-kristensen
Copy link

In news 8.4 change line 144 in Configuration/TCA/Overrides/sys_categori.php to 'displayCond' => 'VERSION:IS:false' will correct this error I think. In Configuration/TCA/tx_news_domain_model_news.php in the 'path_segment' section this change is allreade made.
Martin

@ShortSnow
Copy link
Author

ShortSnow commented Sep 23, 2020

Thats the same solution as tt_adress use ist, i am not so deep in this function to confirm this. But if this is the solution, it must be changed here too: Configuration/TCA/tx_news_domain_model_tag.php

Arne

Edit: Typo

@mogensf
Copy link

mogensf commented Sep 23, 2020

I could only reproduce the issue, when there was no active page with same uid as the sys_category i wanted to edit.

The solution works fine. Thx Martin
(only tested for categories)

Because news extension is installed via composer in my setup, i needed a cleaner implementation.

In the provider extension of the project i added two files:

  1. EXT:provider/Configuartion/TCA/Overrides/sys_category.php
<?php
defined('TYPO3_MODE') or die();

// https://github.com/georgringer/news/issues/1344
if($GLOBALS['TCA']['sys_category']['columns']['slug']['displayCond'] ==
    'USER:' . \TYPO3\CMS\Core\Compatibility\PseudoSiteTcaDisplayCondition::class . '->isInPseudoSite:pages:false')
{
    $GLOBALS['TCA']['sys_category']['columns']['slug']['displayCond'] = 'VERSION:IS:false';
}
  1. EXT:provider/Configuartion/TCA/Overrides/tx_news_domain_model_tag.php
<?php
defined('TYPO3_MODE') or die();

// https://github.com/georgringer/news/issues/1344
if($GLOBALS['TCA']['tx_news_domain_model_tag']['columns']['slug']['displayCond'] ==
    'USER:' . \TYPO3\CMS\Core\Compatibility\PseudoSiteTcaDisplayCondition::class . '->isInPseudoSite:pages:false')
{
    $GLOBALS['TCA']['tx_news_domain_model_tag']['columns']['slug']['displayCond'] = 'VERSION:IS:false';
}

Make sure that the provider extension is loaded after the news extension.
This can be done by adding the news extension to the provider extension's dependencies.
Edit EXT:provider/ext_emconf.php

<?php
$EM_CONF[$_EXTKEY] = array(
    'title' => Provider Extension',
    'constraints' => [
        'depends' => [
            'news' => '8.4.0-8.4.99',
        ],
    ],
);

@martin-git-kristensen
Copy link

martin-git-kristensen commented Sep 24, 2020 via email

@georgringer
Copy link
Owner

changed it now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants