[BUGFIX] Do not append slashes on slug importer 52/58552/3
authorBenni Mack <benni@typo3.org>
Tue, 2 Oct 2018 06:17:55 +0000 (08:17 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 2 Oct 2018 06:49:04 +0000 (08:49 +0200)
When importing from page_path of RealURL,
a slash is appended for all imported URLs,
however TYPO3 Core does not add slashes at the
end for new pages - which leads to a bad UX, having
mixed values.

However, with route enhancers, it is possible to add slashes
to the very end of a link, so it's useful to NOT have them
anymore inside the database.

Resolves: #86536
Releases: master
Change-Id: I50e941ec97a70654d9974757a6191b416aa40c29
Reviewed-on: https://review.typo3.org/58552
Reviewed-by: Kevin Appelt <kevin.appelt@icloud.com>
Reviewed-by: Willi Wehmeier <wwwehmeier@gmail.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/install/Classes/Updates/PopulatePageSlugs.php

index 08f2033..f344797 100644 (file)
@@ -225,7 +225,7 @@ class PopulatePageSlugs implements UpgradeWizardInterface
             ->execute();
         $suggestedSlugs = [];
         while ($row = $statement->fetch()) {
-            $suggestedSlugs[(int)$row['page_id']][(int)$row['language_id']] = '/' . trim($row['pagepath'], '/') . '/';
+            $suggestedSlugs[(int)$row['page_id']][(int)$row['language_id']] = '/' . trim($row['pagepath'], '/');
         }
         return $suggestedSlugs;
     }