Bug #91246
closedrouteEnhancer defaults not applied in TYPO3 v9.5.16
100%
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
Updated by Stephan Großberndt over 4 years ago
- Related to Bug #91245: foo/index.html leads to 404 since TYPO3 9.5.16 added
Updated by Stephan Großberndt over 4 years ago
- Related to Bug #91235: News Detail Page 404 after upgrade 9.5.16 added
Updated by Stephan Großberndt over 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
Updated by Stephan Großberndt over 4 years ago
- Due date deleted (
2019-06-27) - Start date deleted (
2019-06-27)
Reverting https://review.typo3.org/c/Packages/TYPO3.CMS/+/64273 fixes the issue
Updated by Stephan Großberndt over 4 years ago
- Target version set to next-patchlevel
Updated by Oliver Hader over 4 years ago
Do you have a configuration for type: PageType
? If yes, please provide corresponding configuration as well.
Updated by Oliver Hader over 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.
Updated by Oliver Hader over 4 years ago
- Category set to Site Handling, Site Sets & Routing
Updated by Stephan Großberndt over 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
Updated by Oliver Hader over 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)
Updated by Stephan Großberndt over 4 years ago
Oliver Hader wrote:
Stephan: Is there a mapper configuration for
title
as well? Otherwise the configuration provided is adding acHash
(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
Updated by Oliver Hader over 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¶
Updated by Oliver Hader over 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 acHash
(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?
Updated by Stephan Großberndt over 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
Updated by Oliver Hader over 4 years ago
- Related to Bug #90531: Requirements are not considered when an aspect is present added
Updated by Gerrit Code Review over 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
Updated by Oliver Hader over 4 years ago
- Related to deleted (Bug #91245: foo/index.html leads to 404 since TYPO3 9.5.16)
Updated by Oliver Hader over 4 years ago
- Follows deleted (Bug #88633: Slugs ending with substring "index" result in an 404 error)
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Stephan Großberndt over 4 years ago
The most important information was the !
for {!detailType}
, with this it already works with 9.5.16
Updated by Gerrit Code Review over 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
Updated by Oliver Hader over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 960090d692ed77080e2d6453e47dd8bdef1498c0.
Updated by Gerrit Code Review over 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
Updated by Oliver Hader over 4 years ago
- Status changed from Under Review to Resolved
Applied in changeset cf75611eb89f47c9f4502b89c48a9bf83552d96e.
Updated by Oliver Hader over 4 years ago
- Related to Bug #91633: 9.5.19 breaks formerly working routeEnhancer added