Project

General

Profile

Actions

Bug #88860

closed

RouteEnhancer with two actions of one extension on one PID not working

Added by Julian Stock over 5 years ago. Updated almost 5 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2019-07-30
Due date:
% Done:

0%

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

Description

Hey,

I'm trying to migrate/update my old TYPO3 v8 + realurl to TYPO3 v9 + routing.

The "old" way:

1. finanzlexikon.html?tx_news_pi1%5BoverwriteDemand%5D%5Bcategories%5D=1&cHash=391...
2. finanzlexikon.html?tx_news_pi1%5Bnews%5D=1963&cHash=54a...

became to

1. finanzlexikon/a.html
2. finanzlexikon/abgeltungssteuer.html

This is my configuration for realurl:

        '72' => [
            [
                'GETvar' => 'tx_news_pi1[overwriteDemand][categories]',
                'valueMap' => \ACME\MyRealurl\News\FinanzlexikonCategory::getCategories(),
                'noMatch' => 'bypass'
            ],
            [
                'GETvar' => 'tx_news_pi1[news]',
                'lookUpTable' => array(
                    'table' => 'tx_news_domain_model_news',
                    'id_field' => 'uid',
                    'alias_field' => 'title',
                    'useUniqueCache' => 1,
                    'useUniqueCache_conf' => array(
                        'strtolower' => 1,
                        'spaceCharacter' => '-',
                    ),
                    'enable404forInvalidAlias' => true
                ),
            ]
        ],

My (not fully working) configuration for routing:

  Finanzlexikon:
    type: Extbase
    extension: News
    plugin: Pi1
    limitToPages: [72]
    routes:
      - { routePath: '/{news-title}', _controller: 'News::detail', _arguments: { news-title: news } }
      - { routePath: '/{category-name}', _controller: 'News::list', _arguments: { category-name: overwriteDemand/categories } }
    defaultController: 'News::list'
    aspects:
      news-title:
        type: PersistedAliasMapper
        tableName: tx_news_domain_model_news
        routeFieldName: path_segment
      category-name:
        type: PersistedAliasMapper
        tableName: sys_category
        routeFieldName: slug

The result:

1. finanzlexikon.html?tx_news_pi1%5BoverwriteDemand%5D%5Bcategories%5D=1&cHash=391...
2. finanzlexikon.html?tx_news_pi1%5Bnews%5D=1963&cHash=54a...

became to

1. finanzlexikon/a.html
2. finanzlexikon.html?tx_news_pi1%5Bnews%5D=1963&cHash=290...

My conclusion:

It's currently not possible for TYPO3 handling the url rewriting correctly when having two actions of one plugin/controller on one page.

Can anybody confirm that? Technically this has to be possible, because without the RouteEnhancers everything is working as expected (without having nice looking URLs of course).

Thanks for reading!


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #87910: ExtbasePluginEnhancer won't work on same page or without page limitationNew2019-03-14

Actions
Actions

Also available in: Atom PDF