Bug #1278

Router matches static route parts even on substrings

Added by Robert Lemke over 11 years ago. Updated over 9 years ago.

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


PHP Version:
Has patch:


Consider these two routes:

1) typo3/[@controller]
2) typo3cr/[@controller]

Currently route 1) will match this url pattern:


... because the static route part does not know that the segment is longer
than 5 characters, the "typo3" pattern will match. This is due to the ability
to match patterns like "typo3/[@controller]/[@action].[@format]"

The static route part does not have the split string information and therefore
cuts off the beginning of the url according to the length of the "name".

Associated revisions

Revision dd08efba (diff)
Added by Robert Lemke over 11 years ago

  • FLOW3: (Configuration) Made sure that the global settings and the routing configuration is always loaded in the same order (and does not depend on the file system's ordering abilities). Asserted that the FLOW3 routing and settings are always loaded first. Relates to #1278
  • FLOW3: (MVC) A few cosmetic changes.

Revision 3e72dc4d (diff)
Added by Robert Lemke over 11 years ago

  • FLOW3: Marked the previously, mistakenly committed test as skipped. Relates to #1278

Revision 26143959 (diff)
Added by Bastian Waidelich over 11 years ago

  • FLOW3: (MVC) Added check to F3_FLOW3_MVC_Web_Routing_StaticRoutePart: if its the last route part in the current URL segment, name of the route part must be exactly the same as the remaining string in the segment. This is a temporary fix and will be refactored soon. This fixes #1278.


#1 Updated by Robert Lemke over 11 years ago

Maybe this test helps:

 * @test
 * @author Robert Lemke <robert@typo3.org>
public function staticRoutePartDoesNotMatchIfNameIsEqualToTheBeginningOfTheFirstUrlSegmentButTheSegmentIsLonger() {
    $urlSegments = array('foos', 'bar');


#2 Updated by Bastian Waidelich over 11 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r1137.

Also available in: Atom PDF