Project

General

Profile

Actions

Bug #92331

closed

No pseudo-site found in root line of page

Added by Arne Bracht over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2020-09-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
slug,route,speaking,url,pseudo,copy,news,tt_address
Complexity:
Is Regression:
Sprint Focus:

Description

Can't edit or add new categorys

Seems similar to Bug #86684 and comes back with TYPO3 9.5.21

Switch back to TYPO3 9.5.20 as temporary solution


Files

No-pseudo-site.txt (8.33 KB) No-pseudo-site.txt Debug log Daniel Damm, 2020-09-22 14:52

Related issues 2 (0 open2 closed)

Has duplicate TYPO3 Core - Bug #93533: No pseudo-site found in root line of page <sys_category.uid> on sys_category editClosed2021-02-17

Actions
Copied from TYPO3 Core - Bug #86684: "No pseudo-site found in root line of page" when copying records from one sysfolder to anotherClosed2018-10-18

Actions
Actions #1

Updated by Arne Bracht over 3 years ago

  • Copied from Bug #86684: "No pseudo-site found in root line of page" when copying records from one sysfolder to another added
Actions #2

Updated by Oliver Bartsch over 3 years ago

  • Status changed from New to Needs Feedback

Hi,

sys_catgory doesn't feature a slug field by default (by core). This must be added by a 3rd party extension. I just tested it with latest ext:news on latest 9.5 and couldn't reproduce it.

Could you please provide the configuration for your slug field in sys_category. Also some information about your installation like where do you store the categories and which languages are in use. If possible also Stack trace would help to narrow this down.

Actions #3

Updated by Vladimir Kubak over 3 years ago

Have the same problem. News (tx_news) 7.3.1 adds the slug field.

Actions #4

Updated by Daniel Damm over 3 years ago

Editing a tt_address record throws the same error.

We are running:

tt_address 5.1.2
news 8.4.0
typo3 9.5.21

Actions #5

Updated by Oliver Bartsch over 3 years ago

  • Status changed from Needs Feedback to Closed

Hi,

thanks Daniel for the stack trace. As I already thought the problem is the usage of the \TYPO3\CMS\Core\Compatibility\PseudoSiteTcaDisplayCondition::isInPseudoSite() for the slug fields introduced by 3rd party e.g. ext:news or ext:tt_address.

Since https://review.typo3.org/c/Packages/TYPO3.CMS/+/65066 this now breaks.

The reason is that the used display condition is only intended to be used for pages and is furthermore marked as internal. Using it for other record types was never intended and could have been broken already before.

See the PHPDoc:

/**
 * A display condition that returns true if the page we are dealing
 * with is in a page tree that is represented by a PseudoSite object.
 *
 * This is used to suppress the 'slug' field in pseudo site page trees
 * when editing page records and to show the alias field.
 *
 * Both "Pseudo sites" and "alias" db field will bite the dust in TYPO3 v10.0,
 * so this is a temporary display condition for v9 only and thus marked internal.
 *
 * @internal Implementation and class will probably vanish in TYPO3 v10.0 without further notice
 */

Prior to the relevant core patch, $defaultLanguagePageId fell back to 0 by coincidence (for default records).

$defaultLanguagePageId = (int)($parameters['record']['t3ver_oid'] ?: $parameters['record']['uid']);
if (is_array($parameters['record']['l10n_parent'])) {
    // But if the page is a localized page, we take the l10n_parent as uid for the sitematcher
    // This is 0 if the page in a default language page
    $defaultLanguagePageId = (int)$parameters['record']['l10n_parent'][0];
}

This is not longer the case for default language records as the second condition is not matched anymore.

&& (int)$parameters['record']['sys_language_uid'][0] > 0

Side note: It still "works" for records which have the same uid as a pages record. It also "works" for L>0 records because they still fall back to 0.

However, this is not a core bug but a misuse of the internal DisplayCond by 3rd party extensions.

E.g. in the latest tt_address this is already fixed, see: https://github.com/FriendsOfTYPO3/tt_address/commit/4501d1f30f3381a235e447567018e6d5646ec069

Please report the problem to the corresponding extension authors. I will close this issue for now. If you feel there is still something not working in the core, please let me know and I'll re-open the issue or create a new one.

Actions #6

Updated by Sybille Peters over 3 years ago

I had the same problem and can confirm that updating to latest tt_address (5.2.0) solved the problem here. The error occurred when editing a tt_address record in a folder.

Thanks for reporting and researching. That is very helpful, if you find a bug and there is already a solution :)

Actions #7

Updated by Florian Seirer over 3 years ago

News 8.5.0 fixed the problem for me as well, see https://github.com/georgringer/news/issues/1344.

Actions #8

Updated by Jonas Eberle about 3 years ago

  • Has duplicate Bug #93533: No pseudo-site found in root line of page <sys_category.uid> on sys_category edit added
Actions

Also available in: Atom PDF