Project

General

Profile

Actions

Bug #93840

closed

RouteEnhancers with no arguments don't work

Added by Michael Stopp over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2021-03-31
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
pending-close
Complexity:
Is Regression:
Sprint Focus:

Description

I've had a similar problems as described in this post https://stackoverflow.com/questions/59563985/typo3-9-routing-enhancers-with-no-arguments, when trying to define a routing config for the most basic use cases.

For example, in a shopping cart application, all data is stored in the user session, so no arguments are required to call any of the actions. I tried something like this:

routeEnhancers:
  CartPlugin:
    type: Extbase
    extension: MyCart
    plugin: Cart
    routes:
      - { routePath: '/mycart/', _controller: 'Cart::cart' }
      - { routePath: '/summary/', _controller: 'Cart::summary' }
      - { routePath: '/confirmation/', _controller: 'Cart::confirm' }
    defaultController: 'Cart::cart'

The links were created correctly, but when clicking them you would get a 404. Why doesn't this work?
There is no ambiguity in the route paths. There are no parameters that could be wrong or missing or not meeting the requirements.

The documentation has a similar example for rewriting the list action of News, with just a route path + controller without any parameters, which suggests this should be possible.

I've had complicated cases with lots of parameters, own aspects, all sorts of sophisticated mappings, which work very well. So why doesn't such a basic configuration work correctly? Am I missing something? This should be simple (maybe not to code, but to configure).

Actions #1

Updated by Oliver Hader about 2 years ago

  • Sprint Focus set to On Location Sprint
Actions #2

Updated by Oliver Hader about 2 years ago

  • Status changed from New to Needs Feedback
  • Tags set to pending-close
Could not reproduce anymore with TYPO3 v12.1-dev. In case this issue still exists, please provide more details like
  • How are the URLs generated? What parameters were used?
  • What was the resulting URL?
  • Are there other decorators used, e.g. the PageType?
Actions #3

Updated by Benni Mack over 1 year ago

  • Sprint Focus deleted (On Location Sprint)
Actions #4

Updated by Benni Mack about 1 year ago

  • Status changed from Needs Feedback to Closed

Closing this ticket due to lack of feedback. If you feel this is the wrong decision, let me know.

Actions

Also available in: Atom PDF