Issue Bug Rejected

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

Julian Stock 07/30/19, 12:52 updated 01/20/20, 22:24

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!

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.