Actions
Bug #97738
closedException for custom linkhandler tab in link browser
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-06-07
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
I am trying to add a custom LinkHandler to the Linkbrowser in the TYPO3 Backend (v11.5.10). The new Tab is displayed, but a click on it results in an “InvalidTemplateResourceException”.
To reproduce, I setup a blank TYPO3 v11.5.10 environment and installed the “t3docs/examples” extension. It behaves the same.
If you click the “Github Issue” link the same Exception is thrown:
"(1/1) #1257246929 TYPO3Fluid\Fluid\View\Exception\InvalidTemplateResourceException
Tried resolving a template file for controller action "Standard->linkBrowser" in format ".html", but none of the paths contained the expected template file (Standard/LinkBrowser.html). The following paths were checked: /var/www/html/public/typo3/sysext/recordlist/Resources/Private/Templates/LinkBrowser/"
Updated by Andreas Kienast over 1 year ago
- Sprint Focus set to On Location Sprint
Updated by Oliver Hader over 1 year ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Andreas Kienast 12 months ago
- Status changed from New to Needs Feedback
The example in the "examples" extension is broken. This is what needs to be done:
- The custom link handler should extend `TYPO3\CMS\Recordlist\LinkHandler\AbstractLinkHandler`
- The `initialize()` should be a bare minimum:
public function initialize(AbstractLinkBrowserController $linkBrowser, $identifier, array $configuration) { parent::initialize($linkBrowser, $identifier, $configuration); $this->configuration = $configuration; }
Finally, the `render()` method should configure the template path:
public function render(ServerRequestInterface $request): string { // [...] $this->view->setTemplateRootPaths([GeneralUtility::getFileAbsFileName('EXT:examples/Resources/Private/Templates/LinkBrowser')]); // [...] return $this->view->render('GitHub'); }
Updated by Benni Mack 5 months ago
- Status changed from Needs Feedback to Closed
Closing this issue, as this is a documentation topic, and nothing we will change in our code for v11 anymore. Sebastian, let me know if I'm wrong and I will re-open the ticket.
Actions