Bug #88720

Adding pid option to resolve function of PersistedAliasMapper (Multi-site handling and Extbase enhancer slugs)

Added by Stephan Auer over 1 year ago. Updated 7 months ago.

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

100%

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

Description

Hi

Basic problem is described here (in case of news): https://stackoverflow.com/questions/55948340/typo3-how-can-i-use-the-same-slug-for-news-on-a-multidomain-setup

We are facing the problem with our own Extbase extension. There are two sites in one TYPO3 instance. The extension is managing "shop-infos". In both sites there is a shop called "Billa".

So this would be the expected result in list-view for each site:

https://www.site.one/shops/billa
https://www.site.two/shops/billa

For each site there is a folder defined which is storing the "Shop" entries.
In list mode everything is working fine.

But detail view is not correct. Both links are resolved to https://www.site.one/shops/billa (because uid of first "Billa" is lower than of second).

My opinion:
- PersistedAliasMapper is using given field to generate the slug (make uid 1 to "billa"; make uid 2 also to slug "billa"). This is happening correctly in function "generate"
- But the other direction does not respect the root site / storage folder. So my suggestion would be to add a "pid" param to the PersistedAliasMapper settings, or optional to the "resolve" funtion there. Because in the "resolve" function just the slug ist taken (and translated) and thrown to the database - searching for an uid. But in our setting, more (in fact two) uids are returned. So the lower one is given for the detail page -> wrong site.

If somebody of the core-team feels OK with my suggestion, I can also contribute it.

All the best from Vienna
Stephan


Related issues

Related to TYPO3 Core - Bug #90929: Correctly initialize SiteConfiguration in functional testsClosed2020-04-02

Actions
Related to TYPO3 Core - Bug #90950: Extension Scanner is broken due to MethodArgumentRequiredMatcher.phpClosed2020-04-04

Actions
Related to TYPO3 Core - Bug #91235: News Detail Page 404 after upgrade 9.5.16Closed2020-04-29

Actions
Related to TYPO3 Core - Bug #91397: PersistedAliasMapper: 404 error when linking to a detail page and linked data item is outside webrootClosed2020-05-14

Actions
#1

Updated by Stephan Auer over 1 year ago

  • Subject changed from Adding pid option to resolve function PersistedAliasMapper (Multi-site handling and Extbase enhancer slugs) to Adding pid option to resolve function of PersistedAliasMapper (Multi-site handling and Extbase enhancer slugs)
#2

Updated by Georg Ringer over 1 year ago

  • Status changed from New to Accepted

If you got a solution or proof of concept, please push it or add link to gist or private a patch file. Thx!

#3

Updated by Gerrit Code Review about 1 year ago

  • Status changed from Accepted 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/+/61585

#4

Updated by Gerrit Code Review about 1 year 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/+/61585

#5

Updated by Gerrit Code Review about 1 year 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/+/61585

#6

Updated by Gerrit Code Review about 1 year ago

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/+/61586

#7

Updated by Gerrit Code Review about 1 year 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/+/61585

#8

Updated by Gerrit Code Review about 1 year 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/+/61585

#9

Updated by Gerrit Code Review about 1 year 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/+/61585

#10

Updated by Gerrit Code Review about 1 year 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/+/61585

#11

Updated by Gerrit Code Review about 1 year 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/+/61585

#12

Updated by Gerrit Code Review about 1 year 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/+/61586

#13

Updated by Robert Wolle about 1 year ago

It works!
Please release it.
We have about 70 sites in the system, which have the same news title (news-Extension).

Thank you all and keep up the good work!

#14

Updated by Gerrit Code Review 9 months 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/+/61586

#15

Updated by Gerrit Code Review 9 months 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/+/61586

#16

Updated by Gerrit Code Review 9 months 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/+/61586

#17

Updated by Gerrit Code Review 9 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/+/61585

#18

Updated by Gerrit Code Review 9 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/+/61585

#19

Updated by Gerrit Code Review 9 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/+/61585

#20

Updated by Gerrit Code Review 9 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/+/61585

#21

Updated by Gerrit Code Review 9 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/+/61585

#22

Updated by Gerrit Code Review 9 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/+/61585

#23

Updated by Gerrit Code Review 9 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/+/61585

#24

Updated by Gerrit Code Review 9 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/+/61585

#25

Updated by Gerrit Code Review 9 months ago

Patch set 14 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/+/61585

#26

Updated by Gerrit Code Review 9 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/+/61585

#27

Updated by Gerrit Code Review 9 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/+/61585

#28

Updated by Gerrit Code Review 8 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/+/61585

#29

Updated by Gerrit Code Review 8 months ago

Patch set 18 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/+/61585

#30

Updated by Gerrit Code Review 8 months ago

Patch set 19 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/+/61585

#31

Updated by Gerrit Code Review 8 months ago

Patch set 6 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/+/61586

#32

Updated by Oliver Hader 8 months ago

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

Updated by Gerrit Code Review 8 months ago

  • Status changed from Resolved to Under Review

Patch set 7 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/+/61586

#34

Updated by Oliver Hader 8 months ago

  • Related to Bug #90929: Correctly initialize SiteConfiguration in functional tests added
#35

Updated by Oliver Hader 8 months ago

  • Status changed from Under Review to Resolved
#36

Updated by Andreas Fernandez 8 months ago

  • Related to Bug #90950: Extension Scanner is broken due to MethodArgumentRequiredMatcher.php added
#37

Updated by Benni Mack 7 months ago

  • Status changed from Resolved to Closed
#38

Updated by Sven Juergens 7 months ago

This patch caused a different problem with the update to 9.5.16. It is now no longer possible to have a global news folder.
root
- domain1
- news
-detail
- ...
- domain3
- global news folder

all links are created correctly, but the detail view goes more, here it comes to a 404.
are there maybe new options to influence the behaviour?

#39

Updated by Benni Mack 7 months ago

  • Related to Bug #91235: News Detail Page 404 after upgrade 9.5.16 added
#40

Updated by Oliver Hader 7 months ago

  • Related to Bug #91397: PersistedAliasMapper: 404 error when linking to a detail page and linked data item is outside webroot added

Also available in: Atom PDF