Project

General

Profile

Actions

Bug #91246

closed

routeEnhancer defaults not applied in TYPO3 v9.5.16

Added by Stephan Großberndt almost 4 years ago. Updated over 3 years ago.

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

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

The defaults as defined in routeEnhancer are no longer applied in TYPO3 v9.5.16

With a configuration of:

  RoiDetail:
    type: Plugin
    limitToPages:
      - 123
      - 234
    routePath: '/{uid}/{title}/{detailType}'
    defaults:
      detailType: 'details'
    requirements:
      uid: '[0-9]{1,5}'
      title: '[a-zA-Z0-9\-]*'
      detailType: '^details|gpx|kml$'
    namespace: tx_extension_pi_roi_detail
    aspects:
      uid:
        type: MyUidMapper
      detailType:
        type: StaticValueMapper
        map:
          details: 'details'
          kml: 'kml'
          gpx: 'gpx'

a TYPO3 <= v9.5.15 installation creates URLs like
https://example.org/roi-details/1234/roi-title/details
(appending the default "details" as "/details" if not defined during link creation) and allowing to access
https://example.org/roi-details/1234/roi-title/gpx

a TYPO3 v9.5.16 installation creates URLs like
https://example.org/roi-details/1234/roi-title
(omitting the default "details" if not defined during link creation) and leads to 404 on accessing
https://example.org/roi-details/1234/roi-title/details
as well as
https://example.org/roi-details/1234/roi-title/gpx


Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Bug #91235: News Detail Page 404 after upgrade 9.5.16Closed2020-04-29

Actions
Related to TYPO3 Core - Bug #90531: Requirements are not considered when an aspect is presentClosed2020-02-25

Actions
Related to TYPO3 Core - Bug #91633: 9.5.19 breaks formerly working routeEnhancerUnder ReviewOliver Hader2020-06-10

Actions
Actions #1

Updated by Stephan Großberndt almost 4 years ago

  • Related to Bug #91245: foo/index.html leads to 404 since TYPO3 9.5.16 added
Actions #2

Updated by Stephan Großberndt almost 4 years ago

  • Related to Bug #91235: News Detail Page 404 after upgrade 9.5.16 added
Actions #3

Updated by Stephan Großberndt almost 4 years ago

  • Due date set to 2019-06-27
  • Start date changed from 2020-04-30 to 2019-06-27
  • Follows Bug #88633: Slugs ending with substring "index" result in an 404 error added
Actions #4

Updated by Stephan Großberndt almost 4 years ago

  • Due date deleted (2019-06-27)
  • Start date deleted (2019-06-27)
Actions #5

Updated by Stephan Großberndt almost 4 years ago

  • Is Regression set to Yes
Actions #6

Updated by Stephan Großberndt almost 4 years ago

  • Target version set to next-patchlevel
Actions #7

Updated by Oliver Hader almost 4 years ago

Do you have a configuration for type: PageType? If yes, please provide corresponding configuration as well.

Actions #8

Updated by Oliver Hader almost 4 years ago

Since detailType has a mapper (which is more specific) the requirements for that variable are ignored, see https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5.x/Important-86895-RouteAspectsTakePrecedenceOverRequirements.html
Anyway, that's not the cause for the misbehavior - just a side-note.

Actions #9

Updated by Oliver Hader almost 4 years ago

  • Category set to Link Handling, Site Handling & Routing
Actions #10

Updated by Stephan Großberndt almost 4 years ago

I just noticed I checked the wrong system:

Reverting https://review.typo3.org/c/Packages/TYPO3.CMS/+/64273 fixes the issue is wrong, that does not solve this issue, it only solves https://forge.typo3.org/issues/91245

Actions #11

Updated by Stephan Großberndt almost 4 years ago

  • Description updated (diff)
Actions #12

Updated by Oliver Hader almost 4 years ago

Stephan: Is there a mapper configuration for title as well? Otherwise the configuration provided is adding a cHash (which is omitted in your report)

Actions #13

Updated by Stephan Großberndt almost 4 years ago

Oliver Hader wrote:

Stephan: Is there a mapper configuration for title as well? Otherwise the configuration provided is adding a cHash (which is omitted in your report)

No, there is no aspect configuration for title, this is the complete configuration. there is no chash visible in the links, neither before v9.5.16 nor using v9.5.16

Actions #14

Updated by Oliver Hader almost 4 years ago

Symfony's behavior for default values has been applied with https://review.typo3.org/c/Packages/TYPO3.CMS/+/62885 and was "wrong" before.

As a result parameters declared in defaults are not applied to the route anymore, but still could be enforced using ! explicitly before each parameter name. See https://symfony.com/blog/new-in-symfony-4-3-always-include-route-default-values for details

cHash does not seem to be an issue here

Using the two possibilities for default values with detailType still leads to same cHash value - that's okay

routePath: '/{uid}/{title}/{detailType}'

leads to http://en.ip9.local/typoscript/route/100/roi-title?cHash=bc15cdc846593190b001797c9e738938

routePath: '/{uid}/{title}/{!detailType}' (mind the exclamation mark before detailType)

leads to http://en.ip9.local/typoscript/route/100/roi-title/details?cHash=bc15cdc846593190b001797c9e738938

Empty defaults vs. enforced defaults seem to have issues

Actions #15

Updated by Oliver Hader almost 4 years ago

Stephan Großberndt wrote:

Oliver Hader wrote:

Stephan: Is there a mapper configuration for title as well? Otherwise the configuration provided is adding a cHash (which is omitted in your report)

No, there is no aspect configuration for title, this is the complete configuration. there is no chash visible in the links, neither before v9.5.16 nor using v9.5.16

Probably there is a configuration for $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash'] then?

Actions #16

Updated by Stephan Großberndt almost 4 years ago

Oliver Hader wrote:

Probably there is a configuration for $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash'] then?

No, but the one I can verify it with actually is a v9.5.13 - so https://review.typo3.org/c/Packages/TYPO3.CMS/+/60361 is not included here yet (part of v9.5.14+ - that probably explains why no chash is appended

Actions #17

Updated by Oliver Hader almost 4 years ago

  • Related to Bug #90531: Requirements are not considered when an aspect is present added
Actions #18

Updated by Gerrit Code Review almost 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64654

Actions #19

Updated by Oliver Hader almost 4 years ago

  • Related to deleted (Bug #91245: foo/index.html leads to 404 since TYPO3 9.5.16)
Actions #20

Updated by Oliver Hader almost 4 years ago

  • Follows deleted (Bug #88633: Slugs ending with substring "index" result in an 404 error)
Actions #21

Updated by Gerrit Code Review almost 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64654

Actions #22

Updated by Gerrit Code Review almost 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64654

Actions #23

Updated by Gerrit Code Review almost 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64654

Actions #24

Updated by Stephan Großberndt almost 4 years ago

The most important information was the ! for {!detailType}, with this it already works with 9.5.16

Actions #25

Updated by Gerrit Code Review almost 4 years ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64842

Actions #26

Updated by Oliver Hader almost 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #27

Updated by Gerrit Code Review almost 4 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64843

Actions #28

Updated by Oliver Hader almost 4 years ago

  • Status changed from Under Review to Resolved
Actions #29

Updated by Oliver Hader almost 4 years ago

  • Related to Bug #91633: 9.5.19 breaks formerly working routeEnhancer added
Actions #30

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF