Project

General

Profile

Actions

Bug #67355

closed

Manually instantiated objects in 6.2 are incomplete

Added by Aimeos no-lastname-given almost 9 years ago. Updated almost 8 years ago.

Status:
Rejected
Priority:
Won't have this time
Assignee:
-
Category:
Backend API
Target version:
Start date:
2015-06-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
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();

This works in TYPO3 7.0+ but not in 6.2.12

Actions

Also available in: Atom PDF