Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route enhancing on multi domain system using slug field #172

Open
lrsvgl opened this issue Jun 9, 2021 · 1 comment
Open

Route enhancing on multi domain system using slug field #172

lrsvgl opened this issue Jun 9, 2021 · 1 comment

Comments

@lrsvgl
Copy link

lrsvgl commented Jun 9, 2021

On a multi domain page I have articles to deliver across the domains.
In list view the plugin is configured to show a certain category for delivery of articles across domains, functions as expected.
By trying to get the detailView the system shows a 404 page not found message.

The configuration of the route enhancing is:

TtNewsDetail:
type: Plugin
namespace: tx_ttnews
routePath: '/artikel/{tt_news}'
aspects:
tt_news:
type: PersistedAliasMapper
tableName: tt_news
routeFieldName: slug
defaults:
tt_news: '0'

If I change the routeFieldName for example to „uid“, „crdate“ or even „title“ the article is shown in detailView.
Changing back to the field „slug“ the 404 page is shown.

Knowing that I figured out and deleted all duplicates in the slug field. No change of behaviour.
Finally in my developing system I deleted all articles except one und the behaviour is still the same.

Actually I’m running out of ideas.
Maybe there is a wrong configuration concerning cHashes?
Or the RouteEnhancing is not optimal?

Thank You in advance.

@lrsvgl lrsvgl changed the title Rout enhancing on multi domain system using slug field Route enhancing on multi domain system using slug field Jun 9, 2021
@romanchev
Copy link

I have the same problem. I have sysfolder for tt_news outside the website tree.
The problem is related to TCA settings for slug field for tt_news.
If you change
'eval' => 'uniqueInSite',
to
'eval' => 'unique',
the problem will be solved.

There are some conditions related to the situation in typo3/sysext/core/Classes/Routing/Aspect/PersistedAliasMapper.php
and it seems this conditions produce the problem

        if ($this->slugUniqueInSite) {
            $results = array_values($this->filterContainedInSite($results));
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants