Bug #88720

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

Added by Stephan Auer 13 days ago. Updated 13 days ago.

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

0%

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

History

#1 Updated by Stephan Auer 13 days 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)

Also available in: Atom PDF