[!!!][TASK] Remove database field pages.alias 32/59232/7
authorBenni Mack <benni@typo3.org>
Thu, 20 Dec 2018 08:46:12 +0000 (09:46 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 7 Jan 2019 20:32:35 +0000 (21:32 +0100)
This is a precursor for removing PseudoSiteHandling in general.

The database field "pages.alias" field is dropped, along with
the functionality to evalute if a frontend request "?id=acme"
is non-integer, as it now always has to be integer.

Existing links pointing to page aliases will stop working.

Resolves: #87356
Releases: master
Change-Id: I19134cc788e633e140b43497f716082ac96744e5
Reviewed-on: https://review.typo3.org/59232
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
42 files changed:
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Classes/Controller/Page/TreeController.php
typo3/sysext/backend/Classes/Tree/Repository/PageTreeRepository.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/core/Classes/Compatibility/PseudoSiteTcaDisplayCondition.php
typo3/sysext/core/Classes/Database/SoftReferenceIndex.php
typo3/sysext/core/Classes/LinkHandling/LegacyLinkNotationConverter.php
typo3/sysext/core/Classes/LinkHandling/LinkService.php
typo3/sysext/core/Classes/LinkHandling/PageLinkHandler.php
typo3/sysext/core/Classes/Routing/SiteMatcher.php
typo3/sysext/core/Classes/Utility/RootlineUtility.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Configuration/TCA/pages.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
typo3/sysext/core/Resources/Private/Language/locallang_csh_pages.xlf
typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DataSet/LiveDefaultPages.csv
typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/GetUniqueTranslationTest.php
typo3/sysext/core/Tests/Functional/Tca/PagesVisibleFieldsTest.php
typo3/sysext/core/Tests/Unit/LinkHandling/LegacyLinkNotationConverterTest.php
typo3/sysext/core/Tests/Unit/LinkHandling/LinkServiceTest.php
typo3/sysext/core/Tests/Unit/LinkHandling/PageLinkHandlerTest.php
typo3/sysext/core/ext_tables.sql
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php
typo3/sysext/frontend/Classes/Middleware/PageResolver.php
typo3/sysext/frontend/Classes/Page/PageAccessFailureReasons.php
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
typo3/sysext/frontend/Resources/Private/Language/locallang_tca.xlf
typo3/sysext/frontend/Tests/Functional/SiteHandling/Fixtures/PlainScenario.yaml
typo3/sysext/frontend/Tests/Functional/SiteHandling/Fixtures/SlugScenario.yaml
typo3/sysext/frontend/Tests/Functional/SiteHandling/LinkGeneratorTest.php
typo3/sysext/frontend/Tests/Functional/SiteHandling/PlainRequestTest.php
typo3/sysext/frontend/Tests/Functional/SiteHandling/SiteRequestTest.php
typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugLinkGeneratorTest.php
typo3/sysext/impexp/Classes/Import.php
typo3/sysext/info/Classes/Controller/PageInformationController.php
typo3/sysext/info/Resources/Private/Language/locallang_csh_webinfo.xlf
typo3/sysext/install/Classes/Updates/PopulatePageSlugs.php
typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php
typo3/sysext/workspaces/Classes/Middleware/WorkspacePreview.php

index 3854836..131cfa2 100644 (file)
@@ -21,9 +21,6 @@ use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\BackendWorkspaceRestriction;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
 use TYPO3\CMS\Core\Http\HtmlResponse;
 use TYPO3\CMS\Core\Http\JsonResponse;
 use TYPO3\CMS\Core\Imaging\IconFactory;
@@ -433,34 +430,9 @@ class BackendController
         if ($editId) {
             // Looking up the page to edit, checking permissions:
             $where = ' AND (' . $beUser->getPagePermsClause(Permission::PAGE_EDIT) . ' OR ' . $beUser->getPagePermsClause(Permission::CONTENT_EDIT) . ')';
+            $editRecord = null;
             if (MathUtility::canBeInterpretedAsInteger($editId)) {
                 $editRecord = BackendUtility::getRecordWSOL('pages', $editId, '*', $where);
-            } else {
-                $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
-                $queryBuilder->getRestrictions()
-                    ->removeAll()
-                    ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
-                    ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
-
-                $editRecord = $queryBuilder->select('*')
-                    ->from('pages')
-                    ->where(
-                        $queryBuilder->expr()->eq(
-                            'alias',
-                            $queryBuilder->createNamedParameter($editId, \PDO::PARAM_STR)
-                        ),
-                        $queryBuilder->expr()->orX(
-                            $beUser->getPagePermsClause(Permission::PAGE_EDIT),
-                            $beUser->getPagePermsClause(Permission::CONTENT_EDIT)
-                        )
-                    )
-                    ->setMaxResults(1)
-                    ->execute()
-                    ->fetch();
-
-                if ($editRecord !== false) {
-                    BackendUtility::workspaceOL('pages', $editRecord);
-                }
             }
             // If the page was accessible, then let the user edit it.
             if (is_array($editRecord) && $beUser->isInWebMount($editRecord['uid'])) {
index c7d8468..8123ea9 100644 (file)
@@ -291,7 +291,6 @@ class TreeController
             'icon' => $icon->getIdentifier(),
             'name' => $visibleText,
             'nameSourceField' => $nameSourceField,
-            'alias' => htmlspecialchars($page['alias'] ?? ''),
             'prefix' => htmlspecialchars($prefix),
             'suffix' => htmlspecialchars($suffix),
             'locked' => is_array($lockInfo),
index e352842..2c5dc9f 100644 (file)
@@ -48,7 +48,6 @@ class PageTreeRepository
         'title',
         'nav_title',
         'nav_hide',
-        'alias',
         'php_tree_stop',
         'doktype',
         'is_siteroot',
index f2667b1..59346e0 100644 (file)
@@ -1250,7 +1250,7 @@ class BackendUtility
     }
 
     /**
-     * Returns title-attribute information for a page-record informing about id, alias, doktype, hidden, starttime, endtime, fe_group etc.
+     * Returns title-attribute information for a page-record informing about id, doktype, hidden, starttime, endtime, fe_group etc.
      *
      * @param array $row Input must be a page row ($row) with the proper fields set (be sure - send the full range of fields for the table)
      * @param string $perms_clause This is used to get the record path of the shortcut page, if any (and doktype==4)
@@ -1266,9 +1266,6 @@ class BackendUtility
             $out = htmlspecialchars($parts[0]);
             return $includeAttrib ? 'title="' . $out . '"' : $out;
         }
-        if ($row['alias']) {
-            $parts[] = $lang->sL($GLOBALS['TCA']['pages']['columns']['alias']['label']) . ' ' . $row['alias'];
-        }
         if ($row['pid'] < 0) {
             $parts[] = 'v#1.' . $row['t3ver_id'];
         }
@@ -1385,9 +1382,6 @@ class BackendUtility
             $ctrl = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns'];
             // Uid is added
             $out .= 'id=' . $row['uid'];
-            if ($table === 'pages' && $row['alias']) {
-                $out .= ' / ' . $row['alias'];
-            }
             if (static::isTableWorkspaceEnabled($table) && $row['pid'] < 0) {
                 $out .= ' - v#1.' . $row['t3ver_id'];
             }
index 08b7fac..d5c18fc 100644 (file)
@@ -26,7 +26,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * This is used to suppress the 'slug' field in pseudo site page trees
  * when editing page records and to show the alias field.
  *
- * Both "Pseudo sites" and "alias" db field will bite the dust in TYPO3 v10.0,
+ * Both "Pseudo sites" will bite the dust in TYPO3 v10.0,
  * so this is a temporary display condition for v9 only and thus marked internal.
  *
  * @internal Implementation and class will probably vanish in TYPO3 v10.0 without further notice
index 59e1ab0..27a92c2 100644 (file)
@@ -15,8 +15,6 @@ namespace TYPO3\CMS\Core\Database;
  */
 
 use TYPO3\CMS\Core\Core\Environment;
-use TYPO3\CMS\Core\Database\Query\Restriction\BackendWorkspaceRestriction;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
 use TYPO3\CMS\Core\LinkHandling\LinkService;
 use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -428,7 +426,7 @@ class SoftReferenceIndex
      * Analyze content as a TypoLink value and return an array with properties.
      * TypoLinks format is: <link [typolink] [browser target] [css class] [title attribute] [additionalParams]>.
      * See TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::typolink()
-     * The syntax of the [typolink] part is: [typolink] = [page id or alias][,[type value]][#[anchor, if integer = tt_content uid]]
+     * The syntax of the [typolink] part is: [typolink] = [page id][,[type value]][#[anchor, if integer = tt_content uid]]
      * The extraction is based on how \TYPO3\CMS\Frontend\ContentObject::typolink() behaves.
      *
      * @param string $typolinkValue TypoLink value.
@@ -526,16 +524,7 @@ class SoftReferenceIndex
                 $link_param = $pairParts[0];
                 $finalTagParts['type'] = $pairParts[1]; // Overruling 'type'
             }
-
-            // Checking if the id-parameter is an alias.
-            if ((string)$link_param !== '') {
-                if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($link_param)) {
-                    $finalTagParts['alias'] = $link_param;
-                    $link_param = $this->getPageIdFromAlias($link_param);
-                }
-
-                $finalTagParts['page_id'] = (int)$link_param;
-            }
+            $finalTagParts['page_id'] = (int)$link_param;
         }
 
         return $finalTagParts;
@@ -603,7 +592,7 @@ class SoftReferenceIndex
                         'type' => 'db',
                         'recordRef' => 'pages:' . $tLP['page_id'],
                         'tokenID' => $tokenID,
-                        'tokenValue' => $tLP['alias'] ? $tLP['alias'] : $tLP['page_id']
+                        'tokenValue' => $tLP['page_id']
                     ];
                 }
                 // Add type if applicable
@@ -661,32 +650,6 @@ class SoftReferenceIndex
     }
 
     /**
-     * Look up and return page uid for alias
-     *
-     * @param string $link_param Page alias string value
-     * @return int Page uid corresponding to alias value.
-     */
-    public function getPageIdFromAlias($link_param)
-    {
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
-        $queryBuilder->getRestrictions()
-            ->removeAll()
-            ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
-            ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
-
-        $pageUid = $queryBuilder->select('uid')
-            ->from('pages')
-            ->where(
-                $queryBuilder->expr()->eq('alias', $queryBuilder->createNamedParameter($link_param, \PDO::PARAM_STR))
-            )
-            ->setMaxResults(1)
-            ->execute()
-            ->fetchColumn(0);
-
-        return (int)$pageUid;
-    }
-
-    /**
      * Make Token ID for input index.
      *
      * @param string $index Suffix value.
index 7e4d9e0..265f2c7 100644 (file)
@@ -46,7 +46,7 @@ class LegacyLinkNotationConverter
      *  - "mailto" an email address
      *  - "url" external URL
      *  - "file" a local file (checked AFTER getPublicUrl() is called)
-     *  - "page" a page (integer or alias)
+     *  - "page" a page (integer)
      *
      * Does NOT check if the page exists or the file exists.
      *
@@ -187,13 +187,6 @@ class LegacyLinkNotationConverter
         } else {
             $result['pageuid'] = $data;
         }
-
-        // expect an alias
-        if (!MathUtility::canBeInterpretedAsInteger($result['pageuid']) && $result['pageuid'] !== 'current') {
-            $result['pagealias'] = $result['pageuid'];
-            unset($result['pageuid']);
-        }
-
         return $result;
     }
 
index 894bc4c..f23f66d 100644 (file)
@@ -64,7 +64,7 @@ class LinkService implements SingletonInterface
      *  - "mailto" an email address
      *  - "url" external URL
      *  - "file" a local file (checked AFTER getPublicUrl() is called)
-     *  - "page" a page (integer or alias)
+     *  - "page" a page (integer)
      *
      * Does NOT check if the page exists or the file exists.
      *
index 52bbe18..90192d1 100644 (file)
@@ -35,12 +35,7 @@ class PageLinkHandler implements LinkHandlingInterface
      */
     public function asString(array $parameters): string
     {
-        $urn = $this->baseUrn;
-        if (isset($parameters['pagealias']) && $parameters['pagealias'] !== 'current') {
-            $urn .= '?alias=' . $parameters['pagealias'];
-        } else {
-            $urn .= '?uid=' . $parameters['pageuid'];
-        }
+        $urn = $this->baseUrn . '?uid=' . $parameters['pageuid'];
         $urn = rtrim($urn, ':');
         // Page type is set and not empty (= "0" in this case means it is not empty)
         if (isset($parameters['pagetype']) && strlen((string)$parameters['pagetype']) > 0) {
@@ -69,10 +64,6 @@ class PageLinkHandler implements LinkHandlingInterface
             $result['pageuid'] = $data['uid'];
             unset($data['uid']);
         }
-        if (isset($data['alias'])) {
-            $result['pagealias'] = $data['alias'];
-            unset($data['alias']);
-        }
         if (isset($data['type'])) {
             $result['pagetype'] = $data['type'];
             unset($data['type']);
index 130a869..2586667 100644 (file)
@@ -29,8 +29,6 @@ use TYPO3\CMS\Core\Site\Entity\SiteLanguage;
 use TYPO3\CMS\Core\Site\PseudoSiteFinder;
 use TYPO3\CMS\Core\Site\SiteFinder;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\MathUtility;
-use TYPO3\CMS\Frontend\Page\PageRepository;
 
 /**
  * Returns a site or pseudo-site (with sys_domain records) based on a given request.
@@ -89,9 +87,6 @@ class SiteMatcher implements SingletonInterface
 
         $pageId = $request->getQueryParams()['id'] ?? $request->getParsedBody()['id'] ?? 0;
 
-        if (!empty($pageId) && !MathUtility::canBeInterpretedAsInteger($pageId)) {
-            $pageId = (int)GeneralUtility::makeInstance(PageRepository::class)->getPageIdFromAlias($pageId);
-        }
         // First, check if we have a _GET/_POST parameter for "id", then a site information can be resolved based.
         if ($pageId > 0) {
             // Loop over the whole rootline without permissions to get the actual site information
index b67142d..d5147d9 100644 (file)
@@ -81,7 +81,6 @@ class RootlineUtility
         't3ver_wsid',
         't3ver_state',
         'title',
-        'alias',
         'nav_title',
         'media',
         'layout',
index ad1fb9c..ca62c4d 100644 (file)
@@ -1227,7 +1227,7 @@ return [
             mod.web_info.fieldDefinitions {
                 0 {
                     label = LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:pages_0
-                    fields = title,uid,slug,alias,starttime,endtime,fe_group,target,url,shortcut,shortcut_mode
+                    fields = title,uid,slug,starttime,endtime,fe_group,target,url,shortcut,shortcut_mode
                 }
                 1 {
                     label = LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:pages_1
index 6a79789..a973ae2 100644 (file)
@@ -61,10 +61,10 @@ return [
             'page-contentFromPid-hideinmenu' => 'apps-pagetree-page-content-from-page-hideinmenu',
             'default' => 'apps-pagetree-page-default'
         ],
-        'searchFields' => 'title,alias,nav_title,subtitle,url,keywords,description,abstract,author,author_email'
+        'searchFields' => 'title,nav_title,subtitle,url,keywords,description,abstract,author,author_email'
     ],
     'interface' => [
-        'showRecordFieldList' => 'doktype,title,alias,rowDescription,hidden,starttime,endtime,fe_group,url,target,shortcut,keywords,description,abstract,newUntil,lastUpdated,cache_timeout,cache_tags,backend_layout,backend_layout_next_level',
+        'showRecordFieldList' => 'doktype,title,rowDescription,hidden,starttime,endtime,fe_group,url,target,shortcut,keywords,description,abstract,newUntil,lastUpdated,cache_timeout,cache_tags,backend_layout,backend_layout_next_level',
         'maxDBListItems' => 30,
         'maxSingleDBListItems' => 50
     ],
@@ -434,24 +434,6 @@ return [
                 'eval' => 'trim'
             ]
         ],
-        'alias' => [
-            'exclude' => true,
-            'displayCond' => [
-                'AND' => [
-                    'VERSION:IS:false',
-                    'USER:' . \TYPO3\CMS\Core\Compatibility\PseudoSiteTcaDisplayCondition::class . '->isInPseudoSite:pages:true',
-                ],
-            ],
-            'l10n_mode' => 'exclude',
-            'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.alias',
-            'config' => [
-                'type' => 'input',
-                'size' => 50,
-                'max' => 32,
-                'eval' => 'nospace,alphanum_x,lower,unique',
-                'softref' => 'notify'
-            ]
-        ],
         'url' => [
             'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.url',
             'config' => [
@@ -587,7 +569,7 @@ return [
                 'minitems' => 0,
                 'suggestOptions' => [
                     'default' => [
-                        'additionalSearchFields' => 'nav_title, alias, url',
+                        'additionalSearchFields' => 'nav_title, url',
                         'addWhere' => ' AND pages.uid != ###THIS_UID###'
                     ]
                 ],
@@ -640,7 +622,7 @@ return [
                 'minitems' => 0,
                 'suggestOptions' => [
                     'default' => [
-                        'additionalSearchFields' => 'nav_title, alias, url',
+                        'additionalSearchFields' => 'nav_title, url',
                         'addWhere' => ' AND pages.uid != ###THIS_UID###'
                     ]
                 ],
@@ -1114,7 +1096,7 @@ return [
             'showitem' => 'layout, lastUpdated, newUntil, no_search'
         ],
         '3' => [
-            'showitem' => 'alias, target, cache_timeout, cache_tags'
+            'showitem' => 'target, cache_timeout, cache_tags'
         ],
         '5' => [
             'showitem' => 'author, author_email',
@@ -1197,7 +1179,7 @@ return [
         ],
         'links' => [
             'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.links',
-            'showitem' => 'alias;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.alias_formlabel, --linebreak--, target;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.target_formlabel',
+            'showitem' => 'target;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.target_formlabel',
         ],
         'caching' => [
             'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.caching',
index 7a54ef4..fa6d2bf 100644 (file)
@@ -279,6 +279,7 @@ The following PHP class methods that have been previously deprecated for v9 have
 * :php:`TYPO3\CMS\Core\Crypto\PasswordHashing\PhpassPasswordHash->setHashCount()`
 * :php:`TYPO3\CMS\Core\Crypto\PasswordHashing\PhpassPasswordHash->setMaxHashCount()`
 * :php:`TYPO3\CMS\Core\Crypto\PasswordHashing\PhpassPasswordHash->setMinHashCount()`
+* :php:`TYPO3\CMS\Core\Database\SoftReferenceIndex->getPageIdFromAlias()`
 * :php:`TYPO3\CMS\Core\DataHandling\DataHandler->getTCEMAIN_TSconfig()`
 * :php:`TYPO3\CMS\Core\DataHandling\DataHandler->newlog2()`
 * :php:`TYPO3\CMS\Core\DataHandling\DataHandler->resorting()`
@@ -373,6 +374,7 @@ The following PHP class methods that have been previously deprecated for v9 have
 * :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->storeSessionData()`
 * :php:`TYPO3\CMS\Frontend\Page\PageRepository->getFirstWebPage()`
 * :php:`TYPO3\CMS\Frontend\Page\PageRepository->getDomainStartPage()`
+* :php:`TYPO3\CMS\Frontend\Page\PageRepository->getPageIdFromAlias()`
 * :php:`TYPO3\CMS\Frontend\Page\PageRepository->getRootLine()`
 * :php:`TYPO3\CMS\Frontend\Page\PageRepository->getRecordsByField()`
 * :php:`TYPO3\CMS\Frontend\Page\PageRepository->deleteClause()`
@@ -1059,6 +1061,7 @@ The following database tables have been removed:
 
 The following database fields have been removed:
 
+* `pages.alias`
 * `index_phash.data_page_reg1`
 
 
index 2167c79..7dceefe 100644 (file)
@@ -109,18 +109,6 @@ pages:fe_group</source>
                        <trans-unit id="extendToSubpages.image_descr">
                                <source>This page has access restricted to a certain group and has "Extend to Subpages" set as well. This is reflected in the way the page icon has changed.</source>
                        </trans-unit>
-                       <trans-unit id="alias.description">
-                               <source>A URL Alias is a unique identification string for a page. You can use this string instead of the ID number to refer to the page.</source>
-                       </trans-unit>
-                       <trans-unit id="alias.details" xml:space="preserve">
-                               <source>Ultimately a page is identified by its ID number. For example, you may access a page in TYPO3 at '.../?id=123'. If the page with ID '123' has the URL Alias 'one_two_three', then the URL '.../?id=one_two_three' would display exactly the same page, because 'one_two_three' is a URL Alias for the ID '123'.
-URL Aliases are normally assigned to only the most frequently used pages rather than all pages. In most TYPO3 configurations you would be able to use the syntax '.. &amp;lt;link one_two_three&amp;gt;go to the page&amp;lt;/link&amp;gt; ..' to create a link to the page. This is easier to remember.
-Another use is if you need to change which page a commonly used link points to. In this case you can delete the URL Alias for the original page and re-add it on the new page. All links using the URL Alias would now refer to the new page and its ID number.</source>
-                       </trans-unit>
-                       <trans-unit id="alias.syntax" xml:space="preserve">
-                               <source>A URL Alias can contain only lowercase alphanumeric characters and must be unique.
-Please note: If the URL Alias already exists in the site, it will have a number added to the end of it.</source>
-                       </trans-unit>
                        <trans-unit id="target.description">
                                <source>This sets the default Link Target for menu items linking to this page. Can also used to open the page as a popup window.</source>
                        </trans-unit>
index badf239..2f118c7 100644 (file)
@@ -1,5 +1,5 @@
 "pages",,,,,,,,,,,,
-,"uid","pid","sorting","deleted","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","alias"
+,"uid","pid","sorting","deleted","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","keywords"
 ,1,0,256,0,0,0,0,0,0,0,"FunctionalTest","functional"
 ,88,1,256,0,0,0,0,0,0,0,"DataHandlerTest","datahandler"
 ,89,88,256,0,0,0,0,0,0,0,"Relations","relations"
index ba48f46..9681a23 100644 (file)
@@ -31,12 +31,15 @@ class GetUniqueTranslationTest extends AbstractDataHandlerActionTestCase
      */
     public function valueOfUniqueFieldExcludedInTranslationIsUntouchedInTranslation(): void
     {
+        // Mis-using the "keywords" field in the scenario data-set to check for uniqueness
+        $GLOBALS['TCA']['pages']['columns']['keywords']['l10n_mode'] = 'exclude';
+        $GLOBALS['TCA']['pages']['columns']['keywords']['config']['eval'] = 'unique';
         $map = $this->actionService->localizeRecord('pages', self::PAGE_DATAHANDLER, 1);
         $newPageId = $map['pages'][self::PAGE_DATAHANDLER];
         $originalLanguageRecord = BackendUtility::getRecord('pages', self::PAGE_DATAHANDLER);
         $translatedRecord = BackendUtility::getRecord('pages', $newPageId);
 
-        $this->assertEquals('datahandler', $originalLanguageRecord['alias']);
-        $this->assertEquals('datahandler', $translatedRecord['alias']);
+        $this->assertEquals('datahandler', $originalLanguageRecord['keywords']);
+        $this->assertEquals('datahandler', $translatedRecord['keywords']);
     }
 }
index 1e58704..c0a3c26 100644 (file)
@@ -133,7 +133,6 @@ class PagesVisibleFieldsTest extends FunctionalTestCase
                 'cache_timeout',
                 'cache_tags',
                 'content_from_pid',
-                'alias',
                 'target',
                 'cache_timeout',
                 'cache_tags',
@@ -166,7 +165,6 @@ class PagesVisibleFieldsTest extends FunctionalTestCase
                 'cache_timeout',
                 'cache_tags',
                 'content_from_pid',
-                'alias',
                 'target',
                 'cache_timeout',
                 'cache_tags',
@@ -196,7 +194,6 @@ class PagesVisibleFieldsTest extends FunctionalTestCase
                 'cache_timeout',
                 'cache_tags',
                 'content_from_pid',
-                'alias',
                 'target',
                 'cache_timeout',
                 'cache_tags',
index 939ec4c..a56247d 100644 (file)
@@ -97,14 +97,6 @@ class LegacyLinkNotationConverterTest extends UnitTestCase
                 ],
                 't3://page?uid=1&type=0&param=2'
             ],
-            'page with alias - old style' => [
-                'alias13',
-                [
-                    'type' => LinkService::TYPE_PAGE,
-                    'pagealias' => 'alias13'
-                ],
-                't3://page?alias=alias13'
-            ],
             'record of table - old 2-part identifier' => [
                 'record:tx_myext_entity:456',
                 [
index 9cb91d2..6e5f9d3 100644 (file)
@@ -69,14 +69,6 @@ class LinkServiceTest extends UnitTestCase
                 ],
                 't3://page?uid=13&type=31&unbel=ievable#uncool'
             ],
-            'page with alias - old style' => [
-                'alias13',
-                [
-                    'type' => LinkService::TYPE_PAGE,
-                    'pagealias' => 'alias13'
-                ],
-                't3://page?alias=alias13'
-            ],
             'http URL' => [
                 'http://www.have.you/ever?did=this',
                 [
@@ -180,42 +172,6 @@ class LinkServiceTest extends UnitTestCase
                     'pageuid' => 13
                 ],
                 't3://page?uid=13'
-            ],
-            'page with alias - cool style' => [
-                't3://page?alias=alias13',
-                [
-                    'type' => LinkService::TYPE_PAGE,
-                    'pagealias' => 'alias13'
-                ],
-                't3://page?alias=alias13'
-            ],
-            'page with alias and type - cool style' => [
-                't3://page?alias=alias13&type=31',
-                [
-                    'type' => LinkService::TYPE_PAGE,
-                    'pagealias' => 'alias13',
-                    'pagetype' => '31'
-                ],
-                't3://page?alias=alias13&type=31'
-            ],
-            'page with alias and parameters - cool style' => [
-                't3://page?alias=alias13&my=additional&parameter=that&are=nice',
-                [
-                    'type' => LinkService::TYPE_PAGE,
-                    'pagealias' => 'alias13',
-                    'parameters' => 'my=additional&parameter=that&are=nice'
-                ],
-                't3://page?alias=alias13&my=additional&parameter=that&are=nice',
-            ],
-            'page with alias and parameters and fragment - cool style' => [
-                't3://page?alias=alias13&my=additional&parameter=that&are=nice#again',
-                [
-                    'type' => LinkService::TYPE_PAGE,
-                    'pagealias' => 'alias13',
-                    'parameters' => 'my=additional&parameter=that&are=nice',
-                    'fragment' => 'again'
-                ],
-                't3://page?alias=alias13&my=additional&parameter=that&are=nice#again',
             ]
         ];
     }
index 031be6a..1988a6a 100644 (file)
@@ -54,53 +54,6 @@ class PageLinkHandlerTest extends UnitTestCase
                     'pageuid' => 13
                 ],
                 't3://page?uid=13'
-            ],
-            'page with alias - cool style' => [
-                [
-                    'alias' => 'alias13'
-                ],
-                [
-                    'pagealias' => 'alias13'
-                ],
-                't3://page?alias=alias13'
-            ],
-            'page with alias and type - cool style' => [
-                [
-                    'alias' => 'alias13',
-                    'type' => 31
-                ],
-                [
-                    'pagealias' => 'alias13',
-                    'pagetype' => '31'
-                ],
-                't3://page?alias=alias13&type=31'
-            ],
-            'page with alias and parameters - cool style' => [
-                [
-                    'alias' => 'alias13',
-                    'my' => 'additional',
-                    'parameter' => 'that',
-                    'are' => 'nice'
-                ],
-                [
-                    'pagealias' => 'alias13',
-                    'parameters' => 'my=additional&parameter=that&are=nice'
-                ],
-                't3://page?alias=alias13&my=additional&parameter=that&are=nice',
-            ],
-            'page with alias and parameters and fragment - cool style' => [
-                [
-                    'alias' => 'alias13',
-                    'my' => 'additional',
-                    'parameter' => 'that',
-                    'are' => 'nice'
-                ],
-                [
-                    'pagealias' => 'alias13',
-                    'parameters' => 'my=additional&parameter=that&are=nice',
-                    'fragment' => 'again'
-                ],
-                't3://page?alias=alias13&my=additional&parameter=that&are=nice#again',
             ]
         ];
     }
index d3c7c55..6185567 100644 (file)
@@ -106,7 +106,6 @@ CREATE TABLE pages (
        content_from_pid int(10) unsigned DEFAULT '0' NOT NULL,
        mount_pid int(10) unsigned DEFAULT '0' NOT NULL,
        mount_pid_ol tinyint(4) DEFAULT '0' NOT NULL,
-       alias varchar(32) DEFAULT '' NOT NULL,
        l18n_cfg tinyint(4) DEFAULT '0' NOT NULL,
        fe_login_mode tinyint(4) DEFAULT '0' NOT NULL,
        backend_layout varchar(64) DEFAULT '' NOT NULL,
@@ -115,7 +114,6 @@ CREATE TABLE pages (
        # legacy connection UID field to pages_language_overlay table, @deprecated and will be removed in TYPO3 v11
        legacy_overlay_uid int(11) unsigned DEFAULT '0' NOT NULL,
 
-       KEY alias (alias),
        KEY determineSiteRoot (is_siteroot),
        KEY language_identifier (l10n_parent,sys_language_uid)
 );
index b511c13..3d6da97 100644 (file)
@@ -1554,7 +1554,6 @@ abstract class AbstractMenuContentObject
             $overrideArray = [];
             // If a user script returned the value overrideId in the menu array we use that as page id
             $overrideArray['uid'] = $this->mconf['overrideId'] ?: $this->menuArr[$key]['overrideId'];
-            $overrideArray['alias'] = '';
             // Clear MP parameters since ID was changed.
             $MP_params = '';
         } else {
index 93905ad..66649f3 100644 (file)
@@ -914,8 +914,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface
      */
     protected function determineIdIsHiddenPage()
     {
-        $field = MathUtility::canBeInterpretedAsInteger($this->id) ? 'uid' : 'alias';
-
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
             ->getQueryBuilderForTable('pages');
         $queryBuilder
@@ -927,7 +925,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
             ->select('uid', 'hidden', 'starttime', 'endtime')
             ->from('pages')
             ->where(
-                $queryBuilder->expr()->eq($field, $queryBuilder->createNamedParameter($this->id)),
+                $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($this->id, \PDO::PARAM_INT)),
                 $queryBuilder->expr()->gte('pid', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT))
             )
             ->setMaxResults(1)
@@ -956,7 +954,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface
      * this options:
      *
      * - Splitting $this->id if it contains an additional type parameter.
-     * - Getting the id for an alias in $this->id
      * - Finding the domain record start page
      * - First visible page
      * - Relocating the id below the domain record if outside
@@ -991,7 +988,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
      * the fact, that is is called repeated times by the method determineId.
      * The reasons are manifold.
      *
-     * 1.) The first part, the creation of sys_page, the type and alias
+     * 1.) The first part, the creation of sys_page and the type
      * resolution don't need to be repeated. They could be separated to be
      * called only once.
      *
@@ -1018,8 +1015,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface
         // Initialize the PageRepository has to be done after the frontend usergroups are initialized / resolved, as
         // frontend group aspect is modified before
         $this->sys_page = GeneralUtility::makeInstance(PageRepository::class, $this->context);
-        // If $this->id is a string, it's an alias
-        $this->checkAndSetAlias();
         // The id and type is set to the integer-value - just to be sure...
         $this->id = (int)$this->id;
         $this->type = (int)$this->type;
@@ -1085,13 +1080,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface
                         $this->getPageAccessFailureReasons(PageAccessFailureReasons::ACCESS_DENIED_HOST_PAGE_MISMATCH)
                     );
                     break;
-                case 4:
-                    $response = GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction(
-                        $GLOBALS['TYPO3_REQUEST'],
-                        'The requested page alias does not exist',
-                        $this->getPageAccessFailureReasons(PageAccessFailureReasons::PAGE_ALIAS_NOT_FOUND)
-                    );
-                    break;
                 default:
                     $response = GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction(
                         $GLOBALS['TYPO3_REQUEST'],
@@ -1558,22 +1546,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface
         }
     }
 
-    /**
-     * Fetches the integer page id for a page alias.
-     * Looks if ->id is not an integer and if so it will search for a page alias and if found the page uid of that page is stored in $this->id
-     */
-    protected function checkAndSetAlias()
-    {
-        if ($this->id && !MathUtility::canBeInterpretedAsInteger($this->id)) {
-            $aid = $this->sys_page->getPageIdFromAlias($this->id);
-            if ($aid) {
-                $this->id = $aid;
-            } else {
-                $this->pageNotFound = 4;
-            }
-        }
-    }
-
     /********************************************
      *
      * Template and caching related functions.
index 5a9ea04..016ba00 100644 (file)
@@ -101,7 +101,6 @@ class PageArgumentValidator implements MiddlewareInterface
     protected function evaluateCacheHashParameter(array $queryParams, bool $pageNotFoundOnCacheHashError): bool
     {
         if ($this->controller->cHash) {
-            // Make sure we use the page uid and not the page alias
             $queryParams['id'] = $this->controller->id;
             $this->controller->cHash_array = $this->cacheHashCalculator->getRelevantParameters(HttpUtility::buildQueryString($queryParams));
             $cHash_calc = $this->cacheHashCalculator->calculateCacheHash($this->controller->cHash_array);
index 7197ebe..4d782af 100644 (file)
@@ -34,7 +34,6 @@ use TYPO3\CMS\Core\Site\Entity\SiteInterface;
 use TYPO3\CMS\Core\Site\Entity\SiteLanguage;
 use TYPO3\CMS\Core\Type\Bitmask\Permission;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Frontend\Controller\ErrorController;
 use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
 use TYPO3\CMS\Frontend\Page\PageAccessFailureReasons;
@@ -166,22 +165,15 @@ class PageResolver implements MiddlewareInterface
             ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
             ->add(GeneralUtility::makeInstance(FrontendWorkspaceRestriction::class));
 
-        if (MathUtility::canBeInterpretedAsInteger($pageId)) {
-            $constraint = $queryBuilder->expr()->eq(
-                'uid',
-                $queryBuilder->createNamedParameter($pageId, \PDO::PARAM_INT)
-            );
-        } else {
-            $constraint = $queryBuilder->expr()->eq(
-                'alias',
-                $queryBuilder->createNamedParameter($pageId, \PDO::PARAM_STR)
-            );
-        }
-
         $statement = $queryBuilder
             ->select('uid', 'l10n_parent', 'pid')
             ->from('pages')
-            ->where($constraint)
+            ->where(
+                $queryBuilder->expr()->eq(
+                    'uid',
+                    $queryBuilder->createNamedParameter($pageId, \PDO::PARAM_INT)
+                )
+            )
             ->execute();
 
         $page = $statement->fetch();
index a7af263..cebc411 100644 (file)
@@ -24,6 +24,7 @@ final class PageAccessFailureReasons
     // Page resolving issues
     public const NO_PAGES_FOUND = 'page.database.empty';
     public const PAGE_NOT_FOUND = 'page';
+    /** @deprecated  */
     public const PAGE_ALIAS_NOT_FOUND = 'page.alias';
     public const ROOTLINE_BROKEN = 'page.rootline';
 
index 82309e2..95617d8 100644 (file)
@@ -312,46 +312,6 @@ class PageRepository implements LoggerAwareInterface
     }
 
     /**
-     * Returns a pagerow for the page with alias $alias
-     *
-     * @param string $alias The alias to look up the page uid for.
-     * @return int Returns page uid (int) if found, otherwise 0 (zero)
-     * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::checkAndSetAlias(), ContentObjectRenderer::typoLink()
-     */
-    public function getPageIdFromAlias($alias)
-    {
-        $alias = strtolower($alias);
-        $cacheIdentifier = 'PageRepository_getPageIdFromAlias_' . md5($alias);
-        $cache = $this->getRuntimeCache();
-        $cacheEntry = $cache->get($cacheIdentifier);
-        if ($cacheEntry !== false) {
-            return $cacheEntry;
-        }
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
-        $queryBuilder->getRestrictions()
-            ->removeAll()
-            ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
-
-        $row = $queryBuilder->select('uid')
-            ->from('pages')
-            ->where(
-                $queryBuilder->expr()->eq('alias', $queryBuilder->createNamedParameter($alias, \PDO::PARAM_STR)),
-                // "AND pid>=0" because of versioning (means that aliases sent MUST be online!)
-                $queryBuilder->expr()->gte('pid', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT))
-            )
-            ->setMaxResults(1)
-            ->execute()
-            ->fetch();
-
-        if ($row) {
-            $cache->set($cacheIdentifier, $row['uid']);
-            return $row['uid'];
-        }
-        $cache->set($cacheIdentifier, 0);
-        return 0;
-    }
-
-    /**
      * Master helper method to overlay a record to a language.
      *
      * Be aware that for pages the languageId is taken, and for all other records the contentId.
@@ -481,7 +441,6 @@ class PageRepository implements LoggerAwareInterface
                     // Unset vital fields that are NOT allowed to be overlaid:
                     unset($row['uid']);
                     unset($row['pid']);
-                    unset($row['alias']);
                     $overlays[$origUid] = $row;
                 }
             }
@@ -1439,10 +1398,6 @@ class PageRepository implements LoggerAwareInterface
                     // For page+content the "_ORIG_uid" should actually be used as PID for selection.
                     $wsAlt['_ORIG_uid'] = $wsAlt['uid'];
                     $wsAlt['uid'] = $row['uid'];
-                    // Translate page alias as well so links are pointing to the _online_ page:
-                    if ($table === 'pages') {
-                        $wsAlt['alias'] = $row['alias'];
-                    }
                     // Changing input record to the workspace version alternative:
                     $row = $wsAlt;
                     // Check if it is deleted/new
index e419db7..5bdbd7e 100644 (file)
@@ -50,11 +50,8 @@ class PageLinkBuilder extends AbstractTypolinkBuilder
     public function build(array &$linkDetails, string $linkText, string $target, array $conf): array
     {
         $tsfe = $this->getTypoScriptFrontendController();
-        // Checking if the id-parameter is an alias.
-        if (!empty($linkDetails['pagealias'])) {
-            $linkDetails['pageuid'] = $tsfe->sys_page->getPageIdFromAlias($linkDetails['pagealias']);
-        } elseif (empty($linkDetails['pageuid']) || $linkDetails['pageuid'] === 'current') {
-            // If no id or alias is given
+        if (empty($linkDetails['pageuid']) || $linkDetails['pageuid'] === 'current') {
+            // If no id is given
             $linkDetails['pageuid'] = $tsfe->id;
         }
 
@@ -695,10 +692,10 @@ class PageLinkBuilder extends AbstractTypolinkBuilder
     /**
      * The mother of all functions creating links/URLs etc in a TypoScript environment.
      * See the references below.
-     * Basically this function takes care of issues such as type,id,alias and Mount Points, URL rewriting (through hooks), M5/B6 encoded parameters etc.
+     * Basically this function takes care of issues such as type,id and Mount Points, URL rewriting (through hooks), M5/B6 encoded parameters etc.
      * It is important to pass all links created through this function since this is the guarantee that globally configured settings for link creating are observed and that your applications will conform to the various/many configuration options in TypoScript Templates regarding this.
      *
-     * @param array $page The page record of the page to which we are creating a link. Needed due to fields like uid, alias, target, title and sectionIndex_uid.
+     * @param array $page The page record of the page to which we are creating a link. Needed due to fields like uid, target, title and sectionIndex_uid.
      * @param string $target Target string
      * @param bool $no_cache If set, then the "&no_cache=1" parameter is included in the URL.
      * @param string $addParams Additional URL parameters to set in the URL. Syntax is "&foo=bar&foo2=bar2" etc. Also used internally to add parameters if needed.
@@ -719,11 +716,7 @@ class PageLinkBuilder extends AbstractTypolinkBuilder
         }
         // Setting ID/alias:
         $script = 'index.php';
-        if ($page['alias']) {
-            $LD['url'] = $script . '?id=' . rawurlencode($page['alias']);
-        } else {
-            $LD['url'] = $script . '?id=' . $page['uid'];
-        }
+        $LD['url'] = $script . '?id=' . $page['uid'];
         // typeNum
         $typeNum = $this->getTypoScriptFrontendController()->tmpl->setup[$target . '.']['typeNum'];
         if (!MathUtility::canBeInterpretedAsInteger($typeOverride) && (int)$this->getTypoScriptFrontendController()->config['config']['forceTypeValue']) {
index 7c69a0f..f362030 100644 (file)
                        <trans-unit id="pages.target_formlabel">
                                <source>Link Target</source>
                        </trans-unit>
-                       <trans-unit id="pages.alias">
-                               <source>Alias</source>
-                       </trans-unit>
-                       <trans-unit id="pages.alias_formlabel">
-                               <source>URL Alias</source>
-                       </trans-unit>
                        <trans-unit id="pages.url">
                                <source>URL</source>
                        </trans-unit>
index 4b4e43a..7a0f4a7 100644 (file)
@@ -49,9 +49,9 @@ entities:
     - self: {id: 1, title: 'French', code: 'fr'}
     - self: {id: 2, title: 'Franco-Canadian', code: 'fr'}
   page:
-    - self: {id: *idAcmeRootPage, title: 'ACME Inc', type: *pageShortcut, shortcut: 'first', root: true, alias: 'acme-root'}
+    - self: {id: *idAcmeRootPage, title: 'ACME Inc', type: *pageShortcut, shortcut: 'first', root: true}
       children:
-        - self: {id: *idAcmeFirstPage, title: 'EN: Welcome', alias: 'acme-first'}
+        - self: {id: *idAcmeFirstPage, title: 'EN: Welcome'}
           languageVariants:
             - self: {id: 1101, title: 'FR: Welcome', language: 1}
             - self: {id: 1102, title: 'FR-CA: Welcome', language: 2}
@@ -112,7 +112,7 @@ entities:
               - self: {id: 1, username: 'john@doe.local', groups: '10'}
               - self: {id: 2, username: 'manager@other-inc.local', groups: '20'}
               - self: {id: 3, username: 'big-boss@acme-inc.local', groups: '10,20'}
-    - self: {id: 2000, title: 'ACME Blog', type: *pageShortcut, shortcut: 'first', root: true, alias: 'blog-root'}
+    - self: {id: 2000, title: 'ACME Blog', type: *pageShortcut, shortcut: 'first', root: true}
       children:
         - self: {id: 2100, title: 'Authors'}
           children:
index 28d78ab..d9ad70b 100644 (file)
@@ -49,9 +49,9 @@ entities:
     - self: {id: 1, title: 'French', code: 'fr'}
     - self: {id: 2, title: 'Franco-Canadian', code: 'fr'}
   page:
-    - self: {id: *idAcmeRootPage, title: 'ACME Inc', type: *pageShortcut, shortcut: 'first', root: true, alias: 'acme-root', slug: '/'}
+    - self: {id: *idAcmeRootPage, title: 'ACME Inc', type: *pageShortcut, shortcut: 'first', root: true, slug: '/'}
       children:
-        - self: {id: *idAcmeFirstPage, title: 'EN: Welcome', alias: 'acme-first', slug: '/welcome', subtitle: 'hello-and-welcome'}
+        - self: {id: *idAcmeFirstPage, title: 'EN: Welcome', slug: '/welcome', subtitle: 'hello-and-welcome'}
           languageVariants:
             - self: {id: 1101, title: 'FR: Welcome', language: 1, slug: '/bienvenue', subtitle: 'salut-et-bienvenue'}
             - self: {id: 1102, title: 'FR-CA: Welcome', language: 2, slug: '/bienvenue', subtitle: 'salut-et-bienvenue'}
@@ -112,7 +112,7 @@ entities:
               - self: {id: 1, username: 'john@doe.local', groups: '10'}
               - self: {id: 2, username: 'manager@other-inc.local', groups: '20'}
               - self: {id: 3, username: 'big-boss@acme-inc.local', groups: '10,20'}
-    - self: {id: 2000, title: 'ACME Blog', type: *pageShortcut, shortcut: 'first', root: true, alias: 'blog-root', slug: '/'}
+    - self: {id: 2000, title: 'ACME Blog', type: *pageShortcut, shortcut: 'first', root: true, slug: '/'}
       children:
         - self: {id: 2100, title: 'Authors', slug: '/authors'}
           children:
index 294ece9..76b249b 100644 (file)
@@ -113,8 +113,8 @@ class LinkGeneratorTest extends AbstractTestCase
     {
         $instructions = [
             // acme.com -> acme.com (same site)
-            [1100, 1000, 'index.php?id=acme-root'],
-            [1100, 1100, 'index.php?id=acme-first'],
+            [1100, 1000, 'index.php?id=1000'],
+            [1100, 1100, 'index.php?id=1100'],
             [1100, 1200, 'index.php?id=1200'],
             [1100, 1210, 'index.php?id=1210'],
             [1100, 404, 'index.php?id=404'],
@@ -122,13 +122,13 @@ class LinkGeneratorTest extends AbstractTestCase
             [1100, 1300, 'index.php?id=1300'],
             [1100, 1310, 'index.php?id=1310'],
             // acme.com -> blog.acme.com (different site)
-            [1100, 2000, 'index.php?id=blog-root'],
+            [1100, 2000, 'index.php?id=2000'],
             [1100, 2100, 'index.php?id=2100'],
             [1100, 2110, 'index.php?id=2110'],
             [1100, 2111, 'index.php?id=2111'],
             // blog.acme.com -> acme.com (different site)
-            [2100, 1000, 'index.php?id=acme-root'],
-            [2100, 1100, 'index.php?id=acme-first'],
+            [2100, 1000, 'index.php?id=1000'],
+            [2100, 1100, 'index.php?id=1100'],
             [2100, 1200, 'index.php?id=1200'],
             [2100, 1210, 'index.php?id=1210'],
             [2100, 404, 'index.php?id=404'],
@@ -174,8 +174,8 @@ class LinkGeneratorTest extends AbstractTestCase
     {
         $instructions = [
             // acme.com -> acme.com (same site)
-            [[7100, 1700], 7110, 1000, 'index.php?id=acme-root'],
-            [[7100, 1700], 7110, 1100, 'index.php?id=acme-first'],
+            [[7100, 1700], 7110, 1000, 'index.php?id=1000'],
+            [[7100, 1700], 7110, 1100, 'index.php?id=1100'],
             [[7100, 1700], 7110, 1200, 'index.php?id=1200'],
             [[7100, 1700], 7110, 1210, 'index.php?id=1210'],
             [[7100, 1700], 7110, 404, 'index.php?id=404'],
@@ -183,13 +183,13 @@ class LinkGeneratorTest extends AbstractTestCase
             [[7100, 1700], 7110, 1300, 'index.php?id=1300'],
             [[7100, 1700], 7110, 1310, 'index.php?id=1310'],
             // acme.com -> blog.acme.com (different site)
-            [[7100, 1700], 7110, 2000, 'index.php?id=blog-root'],
+            [[7100, 1700], 7110, 2000, 'index.php?id=2000'],
             [[7100, 1700], 7110, 2100, 'index.php?id=2100'],
             [[7100, 1700], 7110, 2110, 'index.php?id=2110'],
             [[7100, 1700], 7110, 2111, 'index.php?id=2111'],
             // blog.acme.com -> acme.com (different site)
-            [[7100, 2700], 7110, 1000, 'index.php?id=acme-root'],
-            [[7100, 2700], 7110, 1100, 'index.php?id=acme-first'],
+            [[7100, 2700], 7110, 1000, 'index.php?id=1000'],
+            [[7100, 2700], 7110, 1100, 'index.php?id=1100'],
             [[7100, 2700], 7110, 1200, 'index.php?id=1200'],
             [[7100, 2700], 7110, 1210, 'index.php?id=1210'],
             [[7100, 2700], 7110, 404, 'index.php?id=404'],
@@ -250,11 +250,11 @@ class LinkGeneratorTest extends AbstractTestCase
     {
         $instructions = [
             // acme.com -> acme.com (same site)
-            [1100, 1100, 0, 'index.php?id=acme-first&L=0'],
-            [1100, 1100, 1, 'index.php?id=acme-first&L=1'],
-            [1100, 1100, 2, 'index.php?id=acme-first&L=2'],
-            [1100, 1101, 0, 'index.php?id=acme-first&L=1'],
-            [1100, 1102, 0, 'index.php?id=acme-first&L=2'],
+            [1100, 1100, 0, 'index.php?id=1100&L=0'],
+            [1100, 1100, 1, 'index.php?id=1100&L=1'],
+            [1100, 1100, 2, 'index.php?id=1100&L=2'],
+            [1100, 1101, 0, 'index.php?id=1100&L=1'],
+            [1100, 1102, 0, 'index.php?id=1100&L=2'],
             // acme.com -> products.acme.com (nested sub-site)
             [1100, 1300, 0, 'index.php?id=1300&L=0'],
             [1100, 1310, 0, 'index.php?id=1310&L=0'],
@@ -271,11 +271,11 @@ class LinkGeneratorTest extends AbstractTestCase
             [1100, 3101, 0, 'index.php?id=3100&L=1'],
             [1100, 3102, 0, 'index.php?id=3100&L=2'],
             // blog.acme.com -> acme.com (different site)
-            [2100, 1100, 0, 'index.php?id=acme-first&L=0'],
-            [2100, 1100, 1, 'index.php?id=acme-first&L=1'],
-            [2100, 1100, 2, 'index.php?id=acme-first&L=2'],
-            [2100, 1101, 0, 'index.php?id=acme-first&L=1'],
-            [2100, 1102, 0, 'index.php?id=acme-first&L=2'],
+            [2100, 1100, 0, 'index.php?id=1100&L=0'],
+            [2100, 1100, 1, 'index.php?id=1100&L=1'],
+            [2100, 1100, 2, 'index.php?id=1100&L=2'],
+            [2100, 1101, 0, 'index.php?id=1100&L=1'],
+            [2100, 1102, 0, 'index.php?id=1100&L=2'],
             // blog.acme.com -> archive (outside site)
             [2100, 3100, 0, 'index.php?id=3100&L=0'],
             [2100, 3100, 1, 'index.php?id=3100&L=1'],
@@ -326,8 +326,8 @@ class LinkGeneratorTest extends AbstractTestCase
     {
         $instructions = [
             // acme.com -> acme.com (same site)
-            [1100, 1000, 'index.php?id=acme-root&testing%5Bvalue%5D=1&cHash=7d1f13fa91159dac7feb3c824936b39d'],
-            [1100, 1100, 'index.php?id=acme-first&testing%5Bvalue%5D=1&cHash=f42b850e435f0cedd366f5db749fc1af'],
+            [1100, 1000, 'index.php?id=1000&testing%5Bvalue%5D=1&cHash=7d1f13fa91159dac7feb3c824936b39d'],
+            [1100, 1100, 'index.php?id=1100&testing%5Bvalue%5D=1&cHash=f42b850e435f0cedd366f5db749fc1af'],
             [1100, 1200, 'index.php?id=1200&testing%5Bvalue%5D=1&cHash=784e11c50ea1a13fd7d969df4ec53ea3'],
             [1100, 1210, 'index.php?id=1210&testing%5Bvalue%5D=1&cHash=ccb7067022b9835ebfd8f720722bc708'],
             [1100, 404, 'index.php?id=404&testing%5Bvalue%5D=1&cHash=864e96f586a78a53452f3bf0f4d24591'],
@@ -335,13 +335,13 @@ class LinkGeneratorTest extends AbstractTestCase
             [1100, 1300, 'index.php?id=1300&testing%5Bvalue%5D=1&cHash=dbd6597d72ed5098cce3d03eac1eeefe'],
             [1100, 1310, 'index.php?id=1310&testing%5Bvalue%5D=1&cHash=e64bfc7ab7dd6b70d161e4d556be9726'],
             // acme.com -> blog.acme.com (different site)
-            [1100, 2000, 'index.php?id=blog-root&testing%5Bvalue%5D=1&cHash=a14da633e46dba71640cb85226cd12c5'],
+            [1100, 2000, 'index.php?id=2000&testing%5Bvalue%5D=1&cHash=a14da633e46dba71640cb85226cd12c5'],
             [1100, 2100, 'index.php?id=2100&testing%5Bvalue%5D=1&cHash=d23d74cb50383f8788a9930ec8ba679f'],
             [1100, 2110, 'index.php?id=2110&testing%5Bvalue%5D=1&cHash=bf25eea89f44a9a79dabdca98f38a432'],
             [1100, 2111, 'index.php?id=2111&testing%5Bvalue%5D=1&cHash=42dbaeb9172b6b1ca23b49941e194db2'],
             // blog.acme.com -> acme.com (different site)
-            [2100, 1000, 'index.php?id=acme-root&testing%5Bvalue%5D=1&cHash=7d1f13fa91159dac7feb3c824936b39d'],
-            [2100, 1100, 'index.php?id=acme-first&testing%5Bvalue%5D=1&cHash=f42b850e435f0cedd366f5db749fc1af'],
+            [2100, 1000, 'index.php?id=1000&testing%5Bvalue%5D=1&cHash=7d1f13fa91159dac7feb3c824936b39d'],
+            [2100, 1100, 'index.php?id=1100&testing%5Bvalue%5D=1&cHash=f42b850e435f0cedd366f5db749fc1af'],
             [2100, 1200, 'index.php?id=1200&testing%5Bvalue%5D=1&cHash=784e11c50ea1a13fd7d969df4ec53ea3'],
             [2100, 1210, 'index.php?id=1210&testing%5Bvalue%5D=1&cHash=ccb7067022b9835ebfd8f720722bc708'],
             [2100, 404, 'index.php?id=404&testing%5Bvalue%5D=1&cHash=864e96f586a78a53452f3bf0f4d24591'],
@@ -534,14 +534,14 @@ class LinkGeneratorTest extends AbstractTestCase
         // -> most probably since pid=-1 is not correctly resolved
         $instructions = [
             // acme.com -> acme.com (same site)
-            [1100, 1100, false, 'index.php?id=acme-first'],
-            [1100, 1100, true, 'index.php?id=acme-first'], // @todo Alias not removed, yet
+            [1100, 1100, false, 'index.php?id=1100'],
+            [1100, 1100, true, 'index.php?id=7131'],
             // [1100, 1950, false, 'index.php?id=1950'], // @todo Not generated for new-placeholder
             [1100, 1950, true, 'index.php?id={targetPageId}'],
             // blog.acme.com -> acme.com (different site)
-            [2100, 1100, false, 'index.php?id=acme-first'],
+            [2100, 1100, false, 'index.php?id=1100'],
             // @todo https://acme.us/ not prefixed for resolved version
-            [2100, 1100, true, 'index.php?id=acme-first'], // @todo Alias not removed, yet
+            [2100, 1100, true, 'index.php?id=7131'],
             // [2100, 1950, false, 'index.php?id=1950'], // @todo Not generated for new-placeholder
             // @todo https://acme.us/ not prefixed for resolved version
             [2100, 1950, true, 'index.php?id={targetPageId}'],
@@ -604,7 +604,7 @@ class LinkGeneratorTest extends AbstractTestCase
             'ACME Inc' => [
                 1100,
                 [
-                    ['title' => 'EN: Welcome', 'link' => 'index.php?id=acme-first'],
+                    ['title' => 'EN: Welcome', 'link' => 'index.php?id=1100'],
                     [
                         'title' => 'EN: Features',
                         'link' => 'index.php?id=1200',
@@ -694,7 +694,7 @@ class LinkGeneratorTest extends AbstractTestCase
                                 ],
                             ],
                         ],
-                    ['title' => 'ACME Inc', 'link' => 'index.php?id=acme-first'],
+                    ['title' => 'ACME Inc', 'link' => 'index.php?id=1100'],
                 ]
             ]
         ];
@@ -740,9 +740,9 @@ class LinkGeneratorTest extends AbstractTestCase
             'ACME Inc' => [
                 1100,
                 [
-                    ['title' => 'Default', 'link' => 'index.php?id=acme-first&L=0'],
-                    ['title' => 'French', 'link' => 'index.php?id=acme-first&L=1'],
-                    ['title' => 'Franco-Canadian', 'link' => 'index.php?id=acme-first&L=2'],
+                    ['title' => 'Default', 'link' => 'index.php?id=1100&L=0'],
+                    ['title' => 'French', 'link' => 'index.php?id=1100&L=1'],
+                    ['title' => 'Franco-Canadian', 'link' => 'index.php?id=1100&L=2'],
                 ]
             ],
             'ACME Blog' => [
index ff172b3..123655d 100644 (file)
@@ -120,7 +120,6 @@ class PlainRequestTest extends AbstractTestCase
         $queries = [
             '?',
             '?id=1000',
-            '?id=acme-root'
         ];
 
         return $this->wrapInArray(
@@ -139,7 +138,7 @@ class PlainRequestTest extends AbstractTestCase
     public function shortcutsAreRedirectedToFirstSubPage(string $uri)
     {
         $expectedStatusCode = 307;
-        $expectedHeaders = ['location' => ['index.php?id=acme-first']];
+        $expectedHeaders = ['location' => ['index.php?id=1100']];
 
         $response = $this->executeFrontendRequest(
             new InternalRequest($uri),
@@ -196,7 +195,6 @@ class PlainRequestTest extends AbstractTestCase
 
         $queries = [
             '?id=1100',
-            '?id=acme-first',
         ];
 
         $languageQueries = [
@@ -462,9 +460,7 @@ class PlainRequestTest extends AbstractTestCase
         $queries = [
             '?',
             '?id=1000',
-            '?id=acme-root',
             '?id=1100',
-            '?id=acme-first',
         ];
 
         $customQueries = [
@@ -546,9 +542,7 @@ class PlainRequestTest extends AbstractTestCase
         $queries = [
             // @todo Currently fails since cHash is verified after(!) redirect to page 1100
             // '?&cHash=7d1f13fa91159dac7feb3c824936b39d&id=1000',
-            // '?&cHash=7d1f13fa91159dac7feb3c824936b39d=acme-root',
             '?&cHash=f42b850e435f0cedd366f5db749fc1af&id=1100',
-            '?&cHash=f42b850e435f0cedd366f5db749fc1af&id=acme-first',
         ];
 
         $customQueries = [
index a545caf..ee6242a 100644 (file)
@@ -110,7 +110,6 @@ class SiteRequestTest extends AbstractTestCase
         $queries = [
             '?',
             '?id=1000',
-            '?id=acme-root'
         ];
 
         return $this->wrapInArray(
@@ -208,7 +207,6 @@ class SiteRequestTest extends AbstractTestCase
 
         $queries = [
             '?id=1100',
-            '?id=acme-first',
         ];
 
         return array_map(
@@ -286,7 +284,6 @@ class SiteRequestTest extends AbstractTestCase
 
         $queries = [
             '?id=1100',
-            '?id=acme-first',
         ];
 
         return array_map(
@@ -588,9 +585,7 @@ class SiteRequestTest extends AbstractTestCase
         $queries = [
             '?',
             '?id=1000',
-            '?id=acme-root',
             '?id=1100',
-            '?id=acme-first',
         ];
 
         $customQueries = [
@@ -773,9 +768,7 @@ class SiteRequestTest extends AbstractTestCase
         $queries = [
             // @todo Currently fails since cHash is verified after(!) redirect to page 1100
             // '?&cHash=7d1f13fa91159dac7feb3c824936b39d&id=1000',
-            // '?&cHash=7d1f13fa91159dac7feb3c824936b39d=acme-root',
             '?&cHash=f42b850e435f0cedd366f5db749fc1af&id=1100',
-            '?&cHash=f42b850e435f0cedd366f5db749fc1af&id=acme-first',
         ];
 
         $customQueries = [
index 076e682..7d03724 100644 (file)
@@ -588,12 +588,12 @@ class SlugLinkGeneratorTest extends AbstractTestCase
         $instructions = [
             // acme.com -> acme.com (same site)
             ['https://acme.us/', 1100, 1100, false, '/welcome'],
-            ['https://acme.us/', 1100, 1100, true, '/index.php?id=acme-first'], // @todo Alias not removed, yet
+            ['https://acme.us/', 1100, 1100, true, '/index.php?id=7131'],
             // ['https://acme.us/', 1100, 1950, false, '/?id=1950'], // @todo Not generated for new-placeholder
             ['https://acme.us/', 1100, 1950, true, '/index.php?id={targetPageId}'],
             // blog.acme.com -> acme.com (different site)
             ['https://blog.acme.com/', 2100, 1100, false, 'https://acme.us/welcome'],
-            ['https://blog.acme.com/', 2100, 1100, true, '/index.php?id=acme-first'], // @todo Alias not removed, yet, domain missing
+            ['https://blog.acme.com/', 2100, 1100, true, '/index.php?id=7131'],
             // ['https://blog.acme.com/', 2100, 1950, false, '/?id=1950'], // @todo Not generated for new-placeholder
             ['https://blog.acme.com/', 2100, 1950, true, '/index.php?id={targetPageId}'], // @todo Domain missing
         ];
index 73cf59a..299b2ad 100644 (file)
@@ -1404,13 +1404,7 @@ class Import extends ImportExport
                             list($tempTable, $tempUid) = explode(':', $cfg['subst']['recordRef']);
                             if (isset($this->import_mapId[$tempTable][$tempUid])) {
                                 $insertValue = BackendUtility::wsMapId($tempTable, $this->import_mapId[$tempTable][$tempUid]);
-                                // Look if reference is to a page and the original token value was NOT an integer - then we assume is was an alias and try to look up the new one!
-                                if ($tempTable === 'pages' && !MathUtility::canBeInterpretedAsInteger($cfg['subst']['tokenValue'])) {
-                                    $recWithUniqueValue = BackendUtility::getRecord($tempTable, $insertValue, 'alias');
-                                    if ($recWithUniqueValue['alias']) {
-                                        $insertValue = $recWithUniqueValue['alias'];
-                                    }
-                                } elseif (strpos($cfg['subst']['tokenValue'], ':') !== false) {
+                                if (strpos($cfg['subst']['tokenValue'], ':') !== false) {
                                     list($tokenKey) = explode(':', $cfg['subst']['tokenValue']);
                                     $insertValue = $tokenKey . ':' . $insertValue;
                                 }
index 54e65ae..970fb93 100644 (file)
@@ -21,9 +21,7 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait;
 use TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait;
 use TYPO3\CMS\Core\Localization\LanguageService;
-use TYPO3\CMS\Core\Site\Entity\NullSite;
 use TYPO3\CMS\Core\Site\Entity\PseudoSite;
-use TYPO3\CMS\Core\Site\Entity\Site;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -230,13 +228,10 @@ class PageInformationController
             $fieldList = str_replace('###ALL_TABLES###', $this->cleanTableNames(), $item['fields']);
             $fields = GeneralUtility::trimExplode(',', $fieldList, true);
             if ((int)$key === 0) {
-                // If "Basic settings" is rendered, hide the alias field on trees that have a site configuration
-                // and hide the slug field on PseudoSites. On NullSites (pid 0), show both.
+                // If "Basic settings" is rendered, hide the slug field on PseudoSites.
                 $site = $request->getAttribute('site');
                 if ($site instanceof PseudoSite) {
                     $fields = array_diff($fields, ['slug']);
-                } elseif ($site instanceof Site && !$site instanceof NullSite) {
-                    $fields = array_diff($fields, ['alias']);
                 }
             }
             $key = trim($key, '.');
index 0ea122b..7206c23 100644 (file)
@@ -29,7 +29,7 @@ EXT:frontend/Resources/Public/Images/cshimages/pagetree_overview_9.png</source>
                                <note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
                        </trans-unit>
                        <trans-unit id="func_0.image_descr" xml:space="preserve">
-                               <source>The Basic Settings view offers a very convenient overview of page aliases, start times and access restriction settings in the tree branch.
+                               <source>The Basic Settings view offers a very convenient overview of page urls, start times and access restriction settings in the tree branch.
 If you click an edit-icon in the header you will be able to edit that field for all listed pages.</source>
                        </trans-unit>
                        <trans-unit id="func_1.alttitle">
index dd61de3..3bfcb6e 100644 (file)
@@ -26,7 +26,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * Does not take "deleted" pages into account, but respects workspace records.
  *
  * This is how it works:
- * - Check if a page has pages.alias filled.
  * - Check if realurl v1 (tx_realurl_pathcache) or v2 (tx_realurl_pathdata) has a page path, use that instead.
  * - If not -> generate the slug.
  *
@@ -118,8 +117,6 @@ class PopulatePageSlugs implements UpgradeWizardInterface
                     $queryBuilder->expr()->isNull($this->fieldName)
                 )
             )
-            // Ensure that fields with alias are managed first
-            ->orderBy('alias', 'desc')
             // Ensure that live workspace records are handled first
             ->addOrderBy('t3ver_wsid', 'asc')
             // Ensure that all pages are run through "per parent page" field, and in the correct sorting values
@@ -147,7 +144,8 @@ class PopulatePageSlugs implements UpgradeWizardInterface
             $pageIdInDefaultLanguage = $languageId > 0 ? (int)$record['l10n_parent'] : $recordId;
             $slug = $suggestedSlugs[$pageIdInDefaultLanguage][$languageId] ?? '';
 
-            // see if an alias field was used, then let's build a slug out of that.
+            // see if an alias field was used, then let's build a slug out of that. This field does not exist in v10
+            // anymore, so this will only be necessary in edge-cases when upgrading from earlier versions with aliases
             if (!empty($record['alias'])) {
                 $slug = $slugHelper->sanitize('/' . $record['alias']);
             }
index 527d9e1..d338452 100644 (file)
@@ -59,34 +59,7 @@ class PageLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac
         if (!$linkParts['url']) {
             return false;
         }
-
         $data = $linkParts['url'];
-        // Checking if the id-parameter is an alias.
-        if (isset($data['pagealias'])) {
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
-                ->getQueryBuilderForTable('pages');
-            $queryBuilder->getRestrictions()
-                ->removeAll()
-                ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
-                ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
-
-            $pageUid = $queryBuilder->select('uid')
-                ->from('pages')
-                ->where(
-                    $queryBuilder->expr()->eq(
-                        'alias',
-                        $queryBuilder->createNamedParameter($data['pagealias'], \PDO::PARAM_STR)
-                    )
-                )
-                ->setMaxResults(1)
-                ->execute()
-                ->fetchColumn(0);
-
-            if ($pageUid === false) {
-                return false;
-            }
-            $data['pageuid'] = (int)$pageUid;
-        }
         // Check if the page still exists
         if ((int)$data['pageuid'] > 0) {
             $pageRow = BackendUtility::getRecordWSOL('pages', $data['pageuid']);
index 1092d06..2fa9a64 100644 (file)
@@ -189,7 +189,7 @@ class WorkspacePreview implements MiddlewareInterface
      * Creates a preview user and sets the workspace ID and the current page ID (for accessing the page)
      *
      * @param int $workspaceUid the workspace ID to set
-     * @param mixed $requestedPageId pageID or alias to the current page
+     * @param mixed $requestedPageId pageID to the current page
      * @return PreviewUserAuthentication|bool if the set up of the workspace was successful, the user is returned.
      */
     protected function initializePreviewUser(int $workspaceUid, $requestedPageId)