Bug #86195

Localization of page fails because of SiteNotFoundException

Added by Andreas Fernandez 11 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Start date:
2018-09-07
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Given scenario:

Have a root page (is_siteroot = 1) with site configuration and localization to Dansk. On the same level, create a new page without setting the is_siteroot flag. When attempting a localization on that page to Dansk as well, the exception is thrown:

(1/1) SiteNotFoundException
No pseudo-site found in root line of page XXX

The REAL interesting thing is, that the reported page XXX is the successfully localized one.


Related issues

Related to TYPO3 Core - Bug #86625: "No pseudo-site found in root line of page" when executing upgrade wizard Closed 2018-10-11
Related to TYPO3 Core - Bug #86809: Resolve strict type assertion in RecordStateFactory Closed 2018-10-31

Associated revisions

Revision 342e7bff (diff)
Added by Oliver Hader 10 months ago

[BUGFIX] Resolve correct page in slug validation

The SlugHelper now receives an encapsulated RecordState object that
represents a record.

This allows fine-grained control over a record and helps resolving
related information, which is required to resolve slugs properly in a
case where e.g. the node ("parent") and language uid can occur multiple
times.

The RecordState contains:

- an EntityContext which describes a variant of a record by its language
and workspace assignment

- a node object (EntityPointer) that points to the node (aka "parent") of
the record

- a EntityUidPointer that describes the origin of the record by its table
name and uid

The RecordStateFactory creates such RecordState objects and enriches them
with links (EntityPointerLink) that point to languages and versions, that
are also represented by EntityPointer implementations.

Resolves: #86195
Releases: master
Change-Id: If17a30e98f802825d80e95044572153f2426bea2
Reviewed-on: https://review.typo3.org/58229
Tested-by: TYPO3com <>
Reviewed-by: Andreas Wolf <>
Tested-by: Daniel Goerz <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>

History

#1 Updated by Andreas Fernandez 11 months ago

How I understand the issue:

The failing part is SlugHelper::isUniqueInSite(), the method tries to find a page on the pid of the created localization. Since there is already a localization on the same pid (but on a different "origin"), the wrong records get fetched and thus the code fails.

#2 Updated by Gerrit Code Review 11 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58224

#3 Updated by Anja Leichsenring 11 months ago

how to reproduce:

- have one rootpage [1] with a site configuration
- have another rootpage [2] without a site configuration (just tested, also fails if a site config exists here)
- on [2], have a translation in language {1} => this gets pid [3]
- configure the site configuration on [1] to contain {1}
- go to page module on language view.
- initiate translation of [1] into {1}

=> SiteNotFoundException
No pseudo-site found in root line of page 3.

So the site finder aims for that translated page from [2], where a translation of [1] should be created.

#4 Updated by Anja Leichsenring 11 months ago

  • Status changed from Under Review to Accepted

#5 Updated by Gerrit Code Review 11 months ago

  • Status changed from Accepted to Under Review

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58229

#6 Updated by Gerrit Code Review 11 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58229

#7 Updated by Gerrit Code Review 11 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58229

#8 Updated by Gerrit Code Review 11 months ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58229

#9 Updated by Gerrit Code Review 11 months ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58229

#10 Updated by Benni Mack 11 months ago

  • Target version changed from 9 LTS to Candidate for patchlevel

#11 Updated by Tymoteusz Motylewski 10 months ago

  • Related to Bug #86625: "No pseudo-site found in root line of page" when executing upgrade wizard added

#12 Updated by Oliver Hader 10 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#13 Updated by Oliver Hader 10 months ago

  • Related to Bug #86809: Resolve strict type assertion in RecordStateFactory added

#14 Updated by Benni Mack 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF