Bug #89153

Wrong Extbase record is shown for slug

Added by Nicole Cordes 7 months ago. Updated 3 days ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-09-11
Due date:
% Done:

100%

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

Description

Given:
- page with at least two languages configured
- Extbase extension with own records
- two records with translations in multiple (at least two) languages
- own slug configuration for translations

Simple example:
- current news version
- routeEnhancers configuration from https://docs.typo3.org/p/georgringer/news/master/en-us/AdministratorManual/BestPractice/Routing/Index.html#about-routes-and-aspects
- two news in default language and (all) translations
- slug for news 1 / language 1 = foo
- slug for news 1 / language 2 = bar
- slug for news 2 / language 1 = bar
- slug for news 2 / language 2 = foo

Expectation:
- path: /language1/foo shows news 1
- path: /language1/bar shows news 2

Actual:
- both paths show the same news (either news 1 or news 2)

2019-09-11_172647.png View (32.1 KB) Nicole Cordes, 2019-09-11 17:27


Related issues

Related to TYPO3 Core - Task #90218: Dissolve PersistenceDelegate for persisted mappers Closed 2020-01-27

Associated revisions

Revision e8310ca6 (diff)
Added by Nicole Cordes about 2 months ago

[BUGFIX] Consider language context and fallbacks in persisted aspects

For PersistedAliasMapper and PersistedPatternMapper, language handling
when resolving a URL route paramter was not explicit enough.

PersistedAliasMapper incorrectly resolved language default records even
when the HTTP request contained a language aspect and a more specific
record (having the same slug value) would have been available.

That was similar in PersistedPatternMapper when `uid` field was not
defined in corresponding pattern (e.g. `^(?P<title>.+)-(?P<uid>\d+)$).

For both mentioned scenarios language restrictions and fallback handling
has been integrated. Records are retrieved in the following order:

+ "all language (-1)", most specific if present, can't be localized
+ "current language" most specific for the current given request context
+ "language fallbacks" (might include "default language")

Resolves: #89153
Releases: master, 9.5
Change-Id: I25b17d1d618bb1509737d43b877a16c3a6da9f28
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61668
Tested-by: TYPO3com <>
Tested-by: Oliver Hader <>
Tested-by: Benni Mack <>
Reviewed-by: Oliver Hader <>
Reviewed-by: Benni Mack <>

Revision d8f581f9 (diff)
Added by Nicole Cordes about 1 month ago

[BUGFIX] Consider language context and fallbacks in persisted aspects

For PersistedAliasMapper and PersistedPatternMapper, language handling
when resolving a URL route paramter was not explicit enough.

PersistedAliasMapper incorrectly resolved language default records even
when the HTTP request contained a language aspect and a more specific
record (having the same slug value) would have been available.

That was similar in PersistedPatternMapper when `uid` field was not
defined in corresponding pattern (e.g. `^(?P<title>.+)-(?P<uid>\d+)$).

For both mentioned scenarios language restrictions and fallback handling
has been integrated. Records are retrieved in the following order:

+ "all language (-1)", most specific if present, can't be localized
+ "current language" most specific for the current given request context
+ "language fallbacks" (might include "default language")

Resolves: #89153
Releases: master, 9.5
Change-Id: I25b17d1d618bb1509737d43b877a16c3a6da9f28
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63287
Tested-by: Oliver Hader <>
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Reviewed-by: Oliver Hader <>
Reviewed-by: Susanne Moog <>

History

#1 Updated by Gerrit Code Review 7 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/c/Packages/TYPO3.CMS/+/61668

#2 Updated by Gerrit Code Review 7 months ago

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

#3 Updated by Gerrit Code Review 7 months ago

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/c/Packages/TYPO3.CMS/+/61668

#4 Updated by Gerrit Code Review 7 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/c/Packages/TYPO3.CMS/+/61668

#5 Updated by Gerrit Code Review 7 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/c/Packages/TYPO3.CMS/+/61668

#6 Updated by Gerrit Code Review 7 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/c/Packages/TYPO3.CMS/+/61668

#7 Updated by Gerrit Code Review 7 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/c/Packages/TYPO3.CMS/+/61668

#8 Updated by Gerrit Code Review 7 months ago

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

#9 Updated by Gerrit Code Review 7 months ago

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

#10 Updated by Oliver Hader 2 months ago

  • Related to Task #90218: Dissolve PersistenceDelegate for persisted mappers added

#11 Updated by Gerrit Code Review 2 months ago

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

#12 Updated by Gerrit Code Review 2 months ago

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

#13 Updated by Gerrit Code Review 2 months ago

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

#14 Updated by Gerrit Code Review 2 months ago

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

#15 Updated by Gerrit Code Review 2 months ago

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

#16 Updated by Gerrit Code Review 2 months ago

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

#17 Updated by Gerrit Code Review 2 months ago

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

#18 Updated by Nicole Cordes about 2 months ago

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

#19 Updated by Gerrit Code Review about 2 months ago

  • Status changed from Resolved to Under Review

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

#20 Updated by Gerrit Code Review about 1 month ago

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63287

#21 Updated by Gerrit Code Review about 1 month ago

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

#22 Updated by Gerrit Code Review about 1 month ago

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

#23 Updated by Gerrit Code Review about 1 month ago

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

#24 Updated by Nicole Cordes about 1 month ago

  • Status changed from Under Review to Resolved

#25 Updated by Benni Mack 3 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF