[TYPO3-mvc] new problem with old extension

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Wed Jan 23 11:38:49 CET 2013


Hello list

 

Last year I wrote an extension for accredit people to a festival (some of
you maybe can remember).

Now, one year later, I tried to reactivate this extension. But the first
tests gave me an error:

Fatal error: Call to undefined method
Tx_Extbase_Persistence_QueryResult::getYear() in
/typo3conf/ext/psoa_accredit/Classes/Controller/AccreditationController.php
on line 210

getYear() is a public function from the Accreditation-Model. 

The code from the AccreditationController is:

$accreditation =
$this->accreditationRepository->findLatestYear($editrights);

if($accreditation->getYear() == date("Y"),time()) redirect('list');

The first line looks for the latest accreditation-object created by this
FE-user. The if-condition redirects if the found object was created this
year.

 

I thought, $accreditation is an object of
Tx_PsoaAccredit_Domain_Model_Accreditation and so I'm able to use
$accreditation->getYear() ??

 

For me it looks good, but there appears the error above. Did something
changed with extbase between the last months? My typo3 is on 4.5.22 with
extbase 1.3.4

 

Thanks

Johannes

 



More information about the TYPO3-project-typo3v4mvc mailing list