[TYPO3-english] problem after update to 6.2 with extension

Markus Klein klein.t3 at mfc-linz.at
Thu Mar 27 19:09:06 CET 2014


Hi!

> 
> hi markus,
> 
> thank you for your help.
> 
> i have changed all your suggestion according to:
> 
> public function preProcess(\TYPO3\CMS\Backend\View\PageLayoutView
> $parentObject, &$drawItem, &$headerContent, &$itemContent, array
> &$row)
> 
> i use this function/hook for a preview of content in the page module.
> 
> i can instance an object like
> 
> $fluidRenderer =
> \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Fluid\
> View\StandaloneView');
> 
> and it works without a problem. but if i instance an oject from a repsoitory in
> this extension like
> 
> $bannerRepository =
> \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Ce\CeContent\Do
> main\Repository\BannerRepository');

That will not work!
Take a look at the constructor of this class. As the error message you posted before already told us, you're missing a required parameter for the constructor.
Signature of the constructor you inherit from the Extbase Repository class looks like:
public function __construct(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager);

So you need to give it the reference to the object manager in use.


> 
> it fails but the repository self is ok and works in frontend.
> 
> ---
> 
> well, i could use
> 
> \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField()
> 
> but i do not get images with this, just the plain data from the db.
> 


Kind regards
Markus

------------------------------------------------------------
Markus Klein
TYPO3 CMS Active Contributors Team Member



More information about the TYPO3-english mailing list