File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 2020use Psr \Log \LoggerAwareInterface ;
2121use Psr \Log \LoggerAwareTrait ;
2222use TYPO3 \CMS \Core \Configuration \ExtensionConfiguration ;
23+ use TYPO3 \CMS \Core \Information \Typo3Version ;
2324use TYPO3 \CMS \Core \Localization \LanguageService ;
2425use TYPO3 \CMS \Core \Log \LogManager ;
2526use TYPO3 \CMS \Core \Pagination \PaginationInterface ;
@@ -124,6 +125,12 @@ protected function initialize(RequestInterface $request): void
124125 $ this ->pageUid = (int ) GeneralUtility::_GET ('id ' );
125126 $ this ->requestData ['page ' ] = $ this ->requestData ['page ' ] ?? 1 ;
126127
128+ if (GeneralUtility::makeInstance (Typo3Version::class)->getMajorVersion () >= 12 ) {
129+ if ($ request ->getAttribute ('applicationType ' ) === 1 ) {
130+ $ this ->pageUid = $ request ->getAttribute ('routing ' )->getPageId ();
131+ }
132+ }
133+
127134 // Sanitize user input to prevent XSS attacks.
128135 $ this ->sanitizeRequestData ();
129136
@@ -151,7 +158,6 @@ protected function initialize(RequestInterface $request): void
151158 } catch (InvalidFileException ) {
152159 $ this ->logger ->warning ('Public resource path of the dlf extension could not be determined ' );
153160 }
154-
155161 }
156162
157163 /**
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ public function correctlyRespondsOnBadVerb()
110110 'verb ' => 'nastyVerb ' ,
111111 ],
112112 ]);
113+
113114 $ xml = new SimpleXMLElement ((string ) $ response ->getBody ());
114115
115116 self ::assertEquals ('badVerb ' , (string ) $ xml ->error ['code ' ]);
You can’t perform that action at this time.
0 commit comments