From e91bbc05ba5bf93e22281e40eaf6e05e1b2a6364 Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Fri, 29 Oct 2021 11:18:12 +0200 Subject: [PATCH] [FEATURE] Revert deep linking to record / field In commit #7ffd3b3 the navigation to forms of TCA records / fields has changed from content frame deep linking to main frame deep linking. This gets reverted with this patch, as content frame deep linking is still supported in TYPO3 v11 LTS by adding a dummy `&token=x` to the content frame url. --- composer.json | 3 --- .../Support/Helper/Typo3Navigation.php | 8 ++------ .../Support/Helper/Typo3Screenshots.php | 4 ++-- patches/EnableEditFormColumnsOnlyParam.patch | 15 --------------- 4 files changed, 4 insertions(+), 26 deletions(-) delete mode 100644 patches/EnableEditFormColumnsOnlyParam.patch diff --git a/composer.json b/composer.json index f0461d64..782a7413 100644 --- a/composer.json +++ b/composer.json @@ -100,9 +100,6 @@ }, "extra": { "patches": { - "typo3/cms-backend": { - "Dirty: Allow deep linking to show a single field of a record": "patches/EnableEditFormColumnsOnlyParam.patch" - }, "typo3/cms-core": { "Dirty: Disable form protection for easy url hopping": "patches/DisableFormProtection.patch" } diff --git a/packages/screenshots/Classes/Runner/Codeception/Support/Helper/Typo3Navigation.php b/packages/screenshots/Classes/Runner/Codeception/Support/Helper/Typo3Navigation.php index e1e24e75..96d7d103 100644 --- a/packages/screenshots/Classes/Runner/Codeception/Support/Helper/Typo3Navigation.php +++ b/packages/screenshots/Classes/Runner/Codeception/Support/Helper/Typo3Navigation.php @@ -465,11 +465,9 @@ public function goToRecord(string $table = '', int $uid = -1): void } [$table, $uid] = $this->resolveRecord($table, $uid); $this->getWebDriver()->amOnPage(sprintf( - '/typo3/record/edit?edit[%s][%s]=edit', + '/typo3/record/edit?edit[%s][%s]=edit&token=x', $table, $uid )); - $this->getWebDriver()->waitForElement('iframe[name="list_frame"]'); - $this->switchToContentFrame(); $this->scrollModuleBodyToTop(); } @@ -502,11 +500,9 @@ public function goToField(string $fields, string $table = '', int $uid = -1): vo } [$table, $uid] = $this->resolveRecord($table, $uid); $this->getWebDriver()->amOnPage(sprintf( - '/typo3/record/edit?edit[%s][%s]=edit&columnsOnly=%s', + '/typo3/record/edit?edit[%s][%s]=edit&columnsOnly=%s&token=x', $table, $uid, $fields )); - $this->getWebDriver()->waitForElement('iframe[name="list_frame"]'); - $this->switchToContentFrame(); $this->scrollModuleBodyToTop(); } diff --git a/packages/screenshots/Classes/Runner/Codeception/Support/Helper/Typo3Screenshots.php b/packages/screenshots/Classes/Runner/Codeception/Support/Helper/Typo3Screenshots.php index ad46c65e..eff7adc9 100644 --- a/packages/screenshots/Classes/Runner/Codeception/Support/Helper/Typo3Screenshots.php +++ b/packages/screenshots/Classes/Runner/Codeception/Support/Helper/Typo3Screenshots.php @@ -167,7 +167,7 @@ public function makeScreenshotOfRecord(string $fileName, string $table = '', int if (!empty($selector)) { $this->makeScreenshotOfElement($fileName, $selector, $altText, $captionText, $captionReference); } else { - $this->makeScreenshotOfContentFrame($fileName, $altText, $captionText, $captionReference); + $this->makeScreenshotOfWindow($fileName, $altText, $captionText, $captionReference); } } @@ -202,7 +202,7 @@ public function makeScreenshotOfField(string $fileName, string $fields, string $ if (!empty($selector)) { $this->makeScreenshotOfElement($fileName, $selector, $altText, $captionText, $captionReference); } else { - $this->makeScreenshotOfContentFrame($fileName, $altText, $captionText, $captionReference); + $this->makeScreenshotOfWindow($fileName, $altText, $captionText, $captionReference); } } diff --git a/patches/EnableEditFormColumnsOnlyParam.patch b/patches/EnableEditFormColumnsOnlyParam.patch deleted file mode 100644 index 6aa9a0ba..00000000 --- a/patches/EnableEditFormColumnsOnlyParam.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: public/typo3/sysext/backend/Configuration/Backend/Routes.php -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== ---- a/typo3/sysext/backend/Configuration/Backend/Routes.php (date 1634295232515) -+++ b/typo3/sysext/backend/Configuration/Backend/Routes.php (date 1634295232515) -@@ -230,6 +230,7 @@ - 'enable' => true, - 'parameters' => [ - 'edit' => true, -+ 'columnsOnly' => true, - ], - ], - ],