Project

General

Profile

Actions

Bug #87436

closed

Routing: empty 'defaults' entry does not work

Added by Wolfgang Klinger about 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-01-15
Due date:
% Done:

0%

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

Description

Example:

    routes:
      - { routePath: '/filter/{semester}/{level}/{language}/{topic}', _controller: 'Something::index', _arguments: {'semester': 'semester', 'level': 'level', 'language': 'language', 'topic': 'topic'} }
    defaults:
      semester: '0'
      level: '0'
      language: '0'
      topic: ''

I want to have 'topic' as optional parameter.
The configuration above does not work.

`www.something.com/some/page/filter/1/2/3/something/` works
`www.something.com/some/page/filter/1/2/3/something` works
`www.something.com/some/page/filter/1/2/3//` does not work
`www.something.com/some/page/filter/1/2/3/` does not work
`www.something.com/some/page/filter/1/2/3` does not work

Solution for now is to add a second route without the topic


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #86895: routeEnhancer not working correct for paginate widgetClosed2018-11-09

Actions
Actions #1

Updated by Wolfgang Klinger about 5 years ago

  • Related to Bug #86895: routeEnhancer not working correct for paginate widget added
Actions #2

Updated by Wolfgang Klinger about 5 years ago

  • Category changed from Frontend to Link Handling, Site Handling & Routing
Actions #3

Updated by Susanne Moog about 4 years ago

  • Sprint Focus set to On Location Sprint
Actions #4

Updated by Oliver Hader about 4 years ago

  • Status changed from New to Needs Feedback
  • Tags set to pending-close
  • Sprint Focus deleted (On Location Sprint)

Please check the change for issue #86895 (or https://forge.typo3.org/issues/86895).

If it does not fix your issue, please report back and mention the used Enhancer type. Thanks!

Actions #5

Updated by Oliver Hader about 4 years ago

Route configuration

  TestingPlugin:
    type: Plugin
    namespace: tx_my
    routePath: '/filter/{a}/{b}/{c}'
    defaults:
      a: '0'
      b: ''
      c: ''
    aspects:
      a: &staticNumbers
        type: StaticRangeMapper
        start: '0'
        end: '9'
      b:
        <<: *staticNumbers
      c:
        <<: *staticNumbers

Does now allow /filter/1/// as well having patch for #86895 applied (merged in 9.5 branch already).

Actions #6

Updated by Oliver Hader about 4 years ago

  • Status changed from Needs Feedback to Closed
Actions

Also available in: Atom PDF