Bug #55492
Disabling the defaultUriSuffix breaks routing
Status: | Resolved | Start date: | 2014-01-31 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | - | |||
Target version: | - |
Description
Hello,
after creating my content I tried to change the routing behaviour in Configuration/Routes.yaml:
'defaultUriSuffix': '.html' => 'defaultUriSuffix': ''
After this change all subpages are not accessible in BE and FE. I cleared the caches with hard reset of removing temporary files but the result stays the same. Following error shows up inside the BE:
Could not read page metadata from response. Please open the location (...) outside the Neos backend.
Same behaviour on Linux shared hosting and local Mac environment.
Regards
Dominic
Related issues
Associated revisions
[BUGFIX] Remove obsolete route that might break routing
This removes the frontend route "content with URI suffix and type"
that could break routing in frontend and backend in certain
circumstances.
Background:
This route was meant to support custom rendering formats (similar to
the ``typeNum`` feature in TYPO3 CMS). But apparently this is currently
not used anywhere in the code and the same can be achieved with custom
routes and/or the ``{@format}`` suffix.
Since support for configurable URI suffixes (introduced with
I14c8a98f341fbc312c57fee44cd383271778e57b) it is possible to disable
the ".html" suffix from all Neos routes. But with that change the
route mentioned above incorreclty matches all pages in the second
level (e.g. "foo/bar").
Change-Id: If0d116c979ede9ad0901a63a4995d26766f95eef
Fixes: #55492
Releases: master, 1.0
Reviewed-on: https://review.typo3.org/27180
Reviewed-by: Bastian Waidelich
Tested-by: Bastian Waidelich
Reviewed-by: Robert Lemke
Tested-by: Dominic Garms
[BUGFIX] Remove obsolete route that might break routing
This removes the frontend route "content with URI suffix and type"
that could break routing in frontend and backend in certain
circumstances.
Background:
This route was meant to support custom rendering formats (similar to
the ``typeNum`` feature in TYPO3 CMS). But apparently this is currently
not used anywhere in the code and the same can be achieved with custom
routes and/or the ``{@format}`` suffix.
Since support for configurable URI suffixes (introduced with
I14c8a98f341fbc312c57fee44cd383271778e57b) it is possible to disable
the ".html" suffix from all Neos routes. But with that change the
route mentioned above incorreclty matches all pages in the second
level (e.g. "foo/bar").
Change-Id: If0d116c979ede9ad0901a63a4995d26766f95eef
Fixes: #55492
Releases: master, 1.0
Reviewed-on: https://review.typo3.org/27184
Reviewed-by: Bastian Waidelich
Tested-by: Bastian Waidelich
Reviewed-by: Karsten Dambekalns
Reviewed-by: Dominique Feyer
Tested-by: Dominique Feyer
[!!!][BUGFIX] Only accepts URLs with the configured URI suffix
This change removes two obsolete routes and adjusts the
``FrontendNodeRoutePartHandler`` so that it matches the full node path.
Background:
The route "Content with some format" accepted all URLs in the format
``{node}.{@format}`` which lead to duplicate content (if your default
suffix is empty and the user appends ".html") and weird errors (if an
arbitrary extension is added to the path, like "some/path.anything").
Besides this change simplifies the ``FrontendNodeRoutePartHandler`` so
that it does not ignore the ``splitString`` option if no dot could be
found in the request path.
This is a breaking change if you relied on the fact that any format
suffix is accepted by Neos.
If you provide a custom format (for example "ics") you should register
a custom route for it in your package::
-
name: 'ICS'
uriPattern: '{node}.ics'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@action': 'show'
'@format': 'ics'
routeParts:
'node':
handler: 'TYPO3\Neos\Routing\FrontendNodeRoutePartHandler'
Releases: master, 1.0
Change-Id: Iea1b92b07daba69f5f76cd7ceb7b81f2d14d68a1
Fixes: #54187
Related: #54217
Related: #55492
Reviewed-on: https://review.typo3.org/25980
Tested-by: Bastian Waidelich
Reviewed-by: Dominique Feyer
Tested-by: Dominique Feyer
Reviewed-by: Aske Ertmann
Reviewed-by: Bastian Waidelich
[!!!][BUGFIX] Only accepts URLs with the configured URI suffix
This change removes two obsolete routes and adjusts the
``FrontendNodeRoutePartHandler`` so that it matches the full node path.
Background:
The route "Content with some format" accepted all URLs in the format
``{node}.{@format}`` which lead to duplicate content (if your default
suffix is empty and the user appends ".html") and weird errors (if an
arbitrary extension is added to the path, like "some/path.anything").
Besides this change simplifies the ``FrontendNodeRoutePartHandler`` so
that it does not ignore the ``splitString`` option if no dot could be
found in the request path.
This is a breaking change if you relied on the fact that any format
suffix is accepted by Neos.
If you provide a custom format (for example "ics") you should register
a custom route for it in your package::
-
name: 'ICS'
uriPattern: '{node}.ics'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@action': 'show'
'@format': 'ics'
routeParts:
'node':
handler: 'TYPO3\Neos\Routing\FrontendNodeRoutePartHandler'
Releases: master, 1.0
Change-Id: Iea1b92b07daba69f5f76cd7ceb7b81f2d14d68a1
Fixes: #54187
Related: #54217
Related: #55492
Reviewed-on: https://review.typo3.org/27656
Reviewed-by: Bastian Waidelich
Tested-by: Bastian Waidelich
Reviewed-by: Aske Ertmann
History
#1 Updated by Bastian Waidelich over 1 year ago
- Status changed from New to Needs Feedback
- Assigned To set to Bastian Waidelich
Hey Dominic,
I doubt that this is related to a routing issue. Did you revert the Routes.yaml change and does that fix the error??
#2 Updated by Dominic Garms over 1 year ago
Hi Bastian,
yes I am absolutely sure. I changed back to '.html' and everything works as expected.
#3 Updated by Bastian Waidelich over 1 year ago
Dominic Garms wrote:
yes I am absolutely sure. I changed back to '.html' and everything works as expected.
Mh, this is strange.. This error is shown if the div "#neos-page-metainformation" is not on the page.. Could you debug a bit more or provide some more details?
#4 Updated by Dominic Garms over 1 year ago
Bastian Waidelich wrote:
Dominic Garms wrote:
yes I am absolutely sure. I changed back to '.html' and everything works as expected.
Mh, this is strange.. This error is shown if the div "#neos-page-metainformation" is not on the page.. Could you debug a bit more or provide some more details?
Are you on skype (mine: dohomi)? I could give you temporary access to the project if you like.
#5 Updated by Bastian Waidelich over 1 year ago
- Subject changed from switching the routing breaks BE and FE to Disabling the defaultUriSuffix breaks routing
- Status changed from Needs Feedback to Accepted
- Priority changed from Should have to Must have
#6 Updated by Gerrit Code Review over 1 year ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/27180
#7 Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 1.0 of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/27184
#8 Updated by Bastian Waidelich over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 5f952cb2146ebb8d4fac07f4f42577d734efea9f.