Project

General

Profile

Actions

Bug #72706

closed

Manually instantiated UriBuilder is incomplete

Added by Aimeos no-lastname-given over 8 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2016-01-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

When trying to instantiate the UriBuilder object in a scheduler task using the object manager, the resulting object is incomplete, esp. the ContentObjectRenderer instance is missing. This results in a fatal error when trying to generate a link.

Example code in scheduler task:

$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( \TYPO3\CMS\Extbase\Object\ObjectManager::class );
$uriBuilder = $objectManager->get( \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class );

$uriBuilder->setTargetPageUid( $pageid )->setArguments( array() );
$url = $uriBuilder->buildFrontendUri();

It worked from 7.0 to at least 7.3 but seemed to vanish in 7.4 again.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #88506: Scheduler generated URLs contain absolute unix pathsClosed2019-06-06

Actions
Actions

Also available in: Atom PDF