[TYPO3-mvc] UriBuilder with realurl in CLI mode

Michael Grundkötter M.Grundkoetter at queo-flow.com
Thu Aug 4 11:04:43 CEST 2011


Hi.

I have a problem using the uri builder in an extbase controller I call from CLI. The controller is called via normal bootstrap stuff and the TS config for the FE of the website is loaded correctly already. The problem is, the uri builder does not care about realurl settings and returns a (relative) url with normal parameters.

The code looks like this:

$this->uriBuilder->setCreateAbsoluteUri(true);
$this->uriBuilder->setTargetPageUid(123);
$this->uriBuilder->setArguments(array('xxx' => yyy));
$this->uriBuilder->buildFrontendUri();

Creates something like: ?id=123&xxx=yyy&cHash=xyz
Should be like this: http://www.myDomain.de/de/my-page-name/xxx/yyy.html

Does anybody know how to get the uri builder to use realurl settings in such a scenario?

The solution right now is to prefix the returned url with the TS baseurl config afterwards which does work but the link in the mail still looks pretty ugly.

TYPO3 version is 4.5.4

THX for any hints on that :-)
Michael


More information about the TYPO3-project-typo3v4mvc mailing list