Feature #88137

Create multi-step fallback for content and arbitrary records

Added by Benni Mack 4 months ago. Updated 4 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-04-11
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

It should be possible to show content of language=2, and if it is not translated, use the fallback chain to language=1 and stop there.


Related issues

Related to TYPO3 Core - Bug #86762: Site-Configuration defined language fallbacks not working Closed 2018-10-26

History

#1 Updated by Benni Mack 4 months ago

  • Related to Bug #86762: Site-Configuration defined language fallbacks not working added

#2 Updated by Benni Mack 4 months ago

Also see Daniel's comment / code snippet in the other issue

#3 Updated by David Bruchmann 4 months ago

Hi Benni,

just pulled news master-dev and tested a bit.
Good news is that without RouteEnhancer everything is working fine, also if I use only the uid in RouteEnhancer.

Fine is related to my (known) personal scenario:
language 0 no fallback
language 1 no fallback
language 2 fallback to language 1

In languages 0 and 1 the slugs are created correct if I use news_title in RouteEnhancer - that's working well.
In language 2 the titles are not produced (by extension seo?) but instead the uids are appended to the configured path, but this is not resolved by EXT:news and results in a 404 error.
So the URLs look like this: https://domain.com/a-lactu/article/255

So my issue is about the RouteEnhancer and the language-fallback of the titles of the news.
Now I don't know if the RouteEnhancer just has to be configured different or if some extensions like seo, backend, frontend, etc. have to be changed (or even something in news).

Here still my desired setup for the news-titles (categories, etc. I leave away here):

routeEnhancers:
  News:
    type: Extbase
    extension: News
    plugin: Pi1
    routes:
      -
        routePath: '/{news_title}'
        _controller: 'News::detail'
        _arguments:
          news_title: news
    defaultController: 'News::list'
    requirements:
      news_title: '^[a-zA-Z0-9].*$'
      page: \d+
    aspects:
      news_title:
        type: PersistedAliasMapper
        tableName: tx_news_domain_model_news
        routeFieldName: path_segment

and here the working setup with uids only:

routeEnhancers:
  News:
    type: Extbase
    extension: News
    plugin: Pi1
    routes:
      -
        routePath: '/{news_uid}'
        _controller: 'News::detail'
        _arguments:
          news_uid: news
    defaultController: 'News::list'
    aspects:
      news_uid:
        type: PersistedAliasMapper
        tableName: tx_news_domain_model_news
        routeFieldName: uid

Also available in: Atom PDF