Issue Bug Closed

#105531Generated uri is always empty if UriBuilder is injected in constructor

David Hoeckele 11/01/24, 12:53 updated 01/28/26, 09:21

Description

I tried to generate an uri in a ViewHelper with the UriBuilder, the way described in documentation: https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ExtensionArchitecture/Extbase/Reference/UriBuilder.html
The generated uri is always empty string. Same result with GeneralUtility::makeInstance. I tried a second example like this:

$uri = $this->uriBuilder
            ->reset()
            ->setRequest($this->getExtbaseRequest())
            ->setTargetPageUid(1)
            ->build();

and the generated link is empty string, too.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.