Bug #86055
closedpages.slug always removes the trailing slash
0%
Updated by Gerrit Code Review over 5 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/58099
Updated by Benni Mack over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 383846c66a985ded636bbc3f24ff445c75e4119b.
Updated by Claus Harup over 5 years ago
"It is totally legitimate to allow /my-page/ as slug (when in FormEngine just remove the "readonly" attribute of the slug field), if explicitly wanted."
That's fine, but whenever I manually end my slug with a trailing / I get a 404 response in FE....
Removing the trailing / again it works like a charm.....
Im working on 9.5.1 and have done no manipulation what so ever regarding slug..... - can you point me in the rigt direction?
Greetings
Updated by Peter Linzenkirchner over 5 years ago
Same in TYPO3 9.5.3: Slug with trailing slash (/myslug/) results in 404.
Updated by Claus Harup over 5 years ago
I have the same excact problem: ending slash results in 404 in TYPO3 v. 9.5.3....
Does anyone have any clue how to fix this.... - Due thousands of indexed URLs endning with slash I have to hold my TYPO3 v. 8 sites from being upgraded :-(
Updated by Josef Glatz over 5 years ago
Hey Peter, hey Claus,
I upgraded my 7.6 instance to 8.6 and then to 9.5. I didn't configured anything special:- I took care of filled realurl tables for all pages and extensions.
- I added the new .htaccess (
typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess
) - I use no sys_domain records
- I removed all language relevant configuration within TypoScript
- I fully use the site management configuration for the concerned website pagetree
- all pages are linked without trailing slash
- Opening a subpage with trailing slash results in a an expected 200 response with the proper webpage
- I also loaded ext:seo which leads into a correct canonical html tag (the actual page without trailing slash)
- edit: I think that's not necessary, but I configured the 404 via site configuration too by using a simple pageID
Maybe you can describe us your approach to the upgraded version
Updated by Davide Litrico over 4 years ago
Hello,
I have the same problem with typo3 v 9.5.8, and I find out that despite the fact that the user can save the slug of a page with a trailing slash, during the process of the request in the method matchRequest of the class TYPO3\CMS\Core\Routing\PageRouter the trailing slash is removed.
At the row 132, you can find:
$prefixedUrlPath = '/' . trim($urlPath, '/');
If you substitute trim with ltrim the page will be found, while if you try to reach the page through the url without slash, it will continue to return the 404 page.
However, I don't know if this change could affect typo3 core in other ways, so I preferred not to apply this change.
Updated by Sybille Peters over 3 years ago
- Related to Bug #89091: Page with a slug with trailing slash results in 404 added
Updated by Marc Hirdes 11 months ago
- Target version deleted (
9.4) - % Done changed from 100 to 0
- TYPO3 Version changed from 9 to 12
Seems like the error is back again in v12.4.1. If the user enters a slug with a trailing slash, then TYPO3 ends in a 404.
Updated by Stefan Bürk 11 months ago
Marc Hirdes wrote in #note-10:
Not really sure if I got it correct, maybe you could provide some more information. For example:Seems like the error is back again in v12.4.1. If the user enters a slug with a trailing slash, then TYPO3 ends in a 404.
- page slug in the database
- used request uri
- default language / language -> siteConfig/siteLanguage base configurtion
- siteConfig routeEnhancers ( for example PageTypeSuffix etc)
You could additionally check if you have some kind of 3rd party extensions
installed providing a middleware interfering here. Also check if there are
some auto-created redirects left in `ext:redirects` redirecting to a invalid
page.
I tried some time arround:
Not working example
page["slug"]......: /my-page/features/ request...........: /my-page/features
is not resolved. The expectation is, that this page is
resolved correctly.
Working examples
page["slug"]......: /my-page/features/ request...........: /my-page/features/
page["slug"]......: /my-page/features request...........: /my-page/features/
page["slug"]......: /my-page/features request...........: /my-page/features
If the "not working example" the case you tried to mention ? If yes,
I've created a dedicated issue for this case, see #100990.
If your case is another, please describe your exact use-case with
further information mentioned above. At best in a dedicated/new issue
relating to this or the other issues.
I could confirm the not working case already in 11.5.x.
Related: #100990
Related: #96010
Related: #88715
Related: #89091
Related: #86055
Updated by Stefan Bürk 11 months ago
- Related to Bug #100990: Pages with trailing slash in slug are not resolved if requested uri does not contain a trailing slash added
Updated by Stefan Bürk 10 months ago
- Related to Bug #96599: Slugs with and without trailing slash are considered different but will confuse URL handling in frontend added