diff --git a/packages/typo3-docs-theme/src/Twig/TwigExtension.php b/packages/typo3-docs-theme/src/Twig/TwigExtension.php index 29bfd47fb..3345cb69d 100644 --- a/packages/typo3-docs-theme/src/Twig/TwigExtension.php +++ b/packages/typo3-docs-theme/src/Twig/TwigExtension.php @@ -398,9 +398,20 @@ public function enrichForgeLink(string $reportButton, RenderContext $renderConte } if (str_ends_with($reportButton, '/new')) { $reportButton .= '?issue[category_id]=1004&issue[subject]='; - $description = $this->getIssueTitle($renderContext); - $reportButton .= urlencode($description); $version = $this->typo3VersionService->getPreferredVersion(); + $extension = $this->themeSettings->getSettings('interlink_shortcode'); + if ($extension === 'changelog') { + $extension = 'typo3/cms-core'; + } + $description = $this->getIssueTitle( + $renderContext, + sprintf( + 'https://docs.typo3.org/c/%s/%s/en-us', + $extension, + $version, + ) + ); + $reportButton .= urlencode($description); switch ($version) { case 'main': $reportButton .= '&issue[custom_field_values][4]=' . Typo3VersionMapping::getMajorVersionOfMain()->value; @@ -423,9 +434,13 @@ public function enrichForgeLink(string $reportButton, RenderContext $renderConte * @param RenderContext $renderContext * @return string */ - public function getIssueTitle(RenderContext $renderContext): string + public function getIssueTitle(RenderContext $renderContext, ?string $docsPath = null): string { - return 'Problem on ' . $this->themeSettings->getSettings('project_home') . '/' . $renderContext->getCurrentFileName() . '.html'; + return sprintf( + 'Problem on %s/%s.html', + $docsPath ?? $this->themeSettings->getSettings('project_home'), + $renderContext->getCurrentFileName() + ); } /** diff --git a/tests/Integration/tests-full/changelog/expected/Changelog/12.0/Breaking-87616-RemovedHookForAlteringPageLinks.html b/tests/Integration/tests-full/changelog/expected/Changelog/12.0/Breaking-87616-RemovedHookForAlteringPageLinks.html index b936a422c..068558b16 100644 --- a/tests/Integration/tests-full/changelog/expected/Changelog/12.0/Breaking-87616-RemovedHookForAlteringPageLinks.html +++ b/tests/Integration/tests-full/changelog/expected/Changelog/12.0/Breaking-87616-RemovedHookForAlteringPageLinks.html @@ -134,7 +134,7 @@