Bug #49653

Image Resize & typolink in extbase extension in TYPO3 6.1.1

Added by Sejal no-lastname-given almost 9 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-07-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
Tags:
Complexity:
hard
Is Regression:
Sprint Focus:

Description

Hi,

I have a problem with resizing image and making typolink in repository file of extbase extension in typo3 version 6.1.1.

Its already working in the typo3 4.7.7 extbase extension.

I have used below code and its showing me error:
Fatal error: Class 'TYPO3\Profile\Domain\Repository\t3lib_div' not found in repository class file.

$this->cObj = t3lib_div::makeInstance('tslib_cObj');
$imageObj['img']='IMAGE';
$imageObj['img.']['file']= "uploads/tx_download/".$row["image"];
$imageObj['img.']['file.']['width']='80';
$imageObj['img.']['file.']['height']='115';
$imageObj['img.']['file.']['params']='-quality 100';
$image = $this->cObj->IMG_RESOURCE($imageObj['img.']);

Can anyone help me in finding the solution?

#1

Updated by Jainish Senjaliya almost 9 years ago

  • Assignee set to Dmitry Dulepov

Hello Sir/Madam,

I have also face same Problem.

Can you please Guide me. IT will be great help me :

Thanks in advance

#2

Updated by Jignesh Prajapati almost 9 years ago

Sejal no-lastname-given wrote:

Hi,

I have a problem with resizing image and making typolink in repository file of extbase extension in typo3 version 6.1.1.

Its already working in the typo3 4.7.7 extbase extension.

I have used below code and its showing me error:
Fatal error: Class 'TYPO3\Profile\Domain\Repository\t3lib_div' not found in repository class file.

$this->cObj = t3lib_div::makeInstance('tslib_cObj');
$imageObj['img']='IMAGE';
$imageObj['img.']['file']= "uploads/tx_download/".$row["image"];
$imageObj['img.']['file.']['width']='80';
$imageObj['img.']['file.']['height']='115';
$imageObj['img.']['file.']['params']='-quality 100';
$image = $this->cObj->IMG_RESOURCE($imageObj['img.']);

Can anyone help me in finding the solution?

In your code please try to replace below line

$this->cObj = t3lib_div::makeInstance('tslib_cObj');

with

$this->cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tslib_cObj');

I hope it will work for you.

Regards,
Jignesh

#3

Updated by Sejal no-lastname-given almost 9 years ago

  • % Done changed from 0 to 100

Thanks for you help.

#4

Updated by Wouter Wolters almost 9 years ago

  • Status changed from New to Resolved
  • Assignee deleted (Dmitry Dulepov)
#5

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF