Bug #102505


wrong routing after succesful call of an action in extbase-controller (with example-Extension)

Added by Dieter Dr. Porth 7 months ago. Updated 5 months ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


I have a form, which contains more than one pages. The user should be allowed to bookmark every page of the form, so that he can finish his work at the next day. TYPO3 did not produce the correct link in the browser-adressline.

Reproduce the unexpected routing
1. Install Extension (plus TYPO3 11 and plus your own sitepackage i.e. with composer as `"monsun/bugtest": "^1.0"`
2. Define routing in site-Config (see fragment in /bugtest/SiteConfig/sites/bugtest/config.yaml)
3. Update models in Database
4. Add Plugin “bugtest_routingtest” on testpage
5. Open Testpage in the frontend.
6. Create a new Testmodel.
7. Use the edit-Link in the list-view.
8. Press the button ‘update and go to EditTwo-view/action’ in the edit-view
After doing step 8 you will arrive the editTwo-View. The browser will show an unreadable link in its adressline. The link looks something like this ``
I expected a link, which looks something like 'this'.
(TYPO3 cann prdouce this link `` expected for EditTwo-Action. See the generated link in the plugin-template.)

The automatically generated link shows, that the site-configuration seems to work correctly. The routing generation in the rendering-process of the plugin seems to be wrong.

Remark: If you remove the `action=”update”` in the <f:form> in `Edit.html` and/or `EditTwo.html`, TYPO3 will produce a link something like the following ``, which is not really helpful.


bugtest.tar.gz (11.2 KB) bugtest.tar.gz Dieter Dr. Porth, 2023-11-24 10:19 (29.8 KB) Dieter Dr. Porth, 2024-01-19 11:49
Actions #1

Updated by Stefan Bürk 5 months ago · Edited

The routes are not really correct in the example extension
site configuration. Therefore, I advise you to read the
documentation regarding the routing and the extbase route
type and the required options [1].

All of the routes are missing a aspect mapping for the
argument `model` to a extbase table and slug field. Without
it it won't work. On top of that, your model is missing a
slug field. So you should add that first in the `ext_tables.sql`
and as a `tca field` - for example a `path_segment` field [2].

Than, your site configuration routing should be look like

    type: Extbase
      - 74
    extension: Bugtest
    plugin: routingtest
        routePath: '/list/'
        _controller: 'Testmodel::list'
        routePath: '/bugedit/{model}'
        _controller: 'Testmodel::edit'
          model: testmodel
        routePath: '/bugedittwo/{model}'
        _controller: 'Testmodel::editTwo'
          model: testmodel
        routePath: '/bugupdate/{model}'
        _controller: 'Testmodel::update'
          model: testmodel
        routePath: '/bugupdate/{model}'
        _controller: 'Testmodel::show'
          model: testmodel
        routePath: '/bugdelete/{model}'
        _controller: 'Testmodel::show'
          model: testmodel
        routePath: '/bugcreate/'
        _controller: 'Testmodel::create'
        routePath: '/bugnew/'
        _controller: 'Testmodel::new'
    defaultController: 'Testmodel::list'
        type: PersistedAliasMapper
        tableName: tx_bugtest_domain_model_testmodel
        routeFieldName: path_segment 

As a general hint, ensure not to use the
`features.skipDefaultArguments` setting for
your plugin.

# extension ext_tables.sql 
CREATE TABLE tx_bugtest_domain_model_testmodel(
  path_segment varchar(2048),
  KEY path_segment (path_segment(127))

and the TCA example for that field and your table (partly)

    'columns' => [
        'path_segment' => [
            'exclude' => 1,
            'label' => 'slug_1',
            'description' => 'field description',
            'config' => [
                'type' => 'slug',
                'generatorOptions' => [
                    'fields' => [
                    'fieldSeparator' => '/',
                    'prefixParentPageSlug' => true,
                    'replacements' => [
                        '/' => '',
                'fallbackCharacter' => '-',
                'eval' => 'uniqueInSite',
                'default' => '',


Actions #2

Updated by Dieter Dr. Porth 5 months ago

Your suggestions didn't solve the problem. I also have incorrect behavior with your instructions.
Not even the links to the forms worked with the aspects.
(See modified extension). (Cause?: The data records are written to page 0 by the plugin.)

Without the aspects, the UID is adopted as a value, which from my understanding should also be standard behavior.

So in my version I can define links that point directly to the `Edit` form or `EditTwo` form. But as soon as I call up the corresponding form using the button with the corresponding action value in the form, the corresponding link is not displayed as a result in the address bar of the browser.
All links in the list-view works fine, so I think, the configuration is correct.

To call up the form `editTwo`, I would have expected the following link in adressline of the browser, analogous to the link in the list view:

When I enter the attribute `action="update"` in Edit's template for f:form, I found the incorrect URL in the address line
Incorrect because the UID of the element to be updated is missing.

If I remove the action="update" attribute from f:form in the 'edit' template, then I found the meaningless URL (default Url) in the browser's address line


Also available in: Atom PDF