Bug #35096

Subroutes can't use empty uriPattern as fallback

Added by Sebastian about 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Category:
MVC - Routing
Target version:
-
Start date:
2012-03-21
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

I have several packages, for each package I like to create a routing shortcut.
So that instead of using these urls

test.local/Myverylongpersonalname.Myproject/posts
test.local/Myverylongpersonalname.MyprojectTest/images

I can use these
test.local/mm/posts
test.local/test/images

I prefer to shorten the routes by adding subroutes to the global Routes.yaml like this:

-
  name: 'Myverylongpersonalname Myproject'
  uriPattern: 'mm/<MMSubroutes>'
  defaults:
    '@package': 'Myverylongpersonalname.Myproject'
  subRoutes:
    MMSubroutes:
      package: Myverylongpersonalname.Myproject

Now I would expect that I can add uriPattern: '' as a fallback route in the Routes.yaml of Myverylongpersonalname.Myproject, but I get:

The URI pattern "mm/" of route "Myverylongpersonalname Myproject :: fallback" ends with a slash, which is not allowed. You can put the trailing slash in brackets to make it optional. 

Well and uriPattern: '(/)' doesn't work either.


Related issues

Is duplicate of TYPO3.Flow - Feature #31777: SubRoutes should allow routes starting or ending with /ResolvedBastian Waidelich2011-11-12

Actions
#1

Updated by Bastian Waidelich over 8 years ago

  • Status changed from New to Closed
  • Assignee set to Bastian Waidelich

Closing as duplicate of #31777
Please review https://review.typo3.org/#/c/16671/

Also available in: Atom PDF